instancename

Normal unordered list

This attribute gives the created object an ID.

<ul id="menu" class="dbtree">
<li><a href="index.cfm" title="home"><span>home</span></a></li>
<li><a href="web/demo/index.cfm" title="demo"><span>demo<span></a></li>
<li>.....</li>
</ul>

Example

Unordered list with checkboxes

In this case, the ID of the list will become "ul" + instancename. The checkboxes will become the name with the value of the attribute instancename, so you can access the checked boxes via the array with the name of instancename:

<ul id="ulchecklist">
<li><input name="checklist" type="checkbox" value="2" />&nbsp;home</li>
<li><input name="checklist" type="checkbox" value="3" />&nbsp;write<ul>
<li><input name="checklist" type="checkbox" value="4" />&nbsp;write page</li>
<li><input name="checklist" type="checkbox" value="5" />&nbsp;write post</li>
</ul>

Example

Selectboxes

Another case is the selectbox. The attribute instancename gives the select a name and an id. The option value is the node ID:

<select name="list1" id="list1">
<option value="1168">drinks</option>
<option value="1173">food</option>
<option value="1171">clothes</option>
<option value="1175">tools</option>
</select>

Example

 

Add your comment to this page Add Comment
Join for a free account, or login if you are already a member.