Generating a unique ID for a coach view
In some situations you might want to use the ID attribute for your DOM elements within a coach view. However, all DOM IDs must be globally unique. For example, during collaboration the default highlighting behavior is implemented based on a unique DOM ID. To ensure a unique ID, you can use the $$viewDOMID$$ placeholder keyword. At run time, this keyword will be replaced by the coach view DOM ID.
About this task
Procedure
To generate a unique ID:
- Open the coach view
- Switch to the Layout page
- Create a custom HTML control.
- Enter custom HTML code, and use $$viewDOMID$$ in
the id attribute:
<div id="$$viewDOMID$$_myId1"> <span id="$$viewDOMID$$_myId2"></span> <input id="$$viewDOMID$$_myId3" type="button" class="Jquerybutton" name="jbtnName" value="default"></input> </div>
Tip: To avoid potential conflicts, use a meaningful suffix after $$viewDOMID$$, for example $$viewDOMID$$_buttonDiv.