ReportingAnalyst
MIS
I have this HTML code which is built dynamically:
My javascript function refers to this UL tag. But how I refer to the 'UI' before the number?
Javascript function is:
Code:
<[b]ul id="UI2271284"[/b] style="display: none">
<li>
<input type="radio" name="empid" id="empid40962" value="40962">Julie Breslow <font size=1>(40962)</font>
</li>
<li>
<input type="radio" name="empid" id="empid41382" value="41382">Frank Duplak <font size=1>(41382)</font>
</li>
</ul>
My javascript function refers to this UL tag. But how I refer to the 'UI' before the number?
Javascript function is:
Code:
function s_Hide(el){
[b] obj = document.getElementById(el).style;[/b]
(obj.display == 'none')? obj.display = 'block' : obj.display = 'none';
//Need to store the current state on a cookie
var uniqueStr = '&' + el + '&'
if (obj.display == 'block')
{
// add it to the string openedItems
//alert("Add '" + uniqueStr + "'");
openedItems = openedItems.concat(uniqueStr);
}
else
{
// remove it from the string openedItems
//alert("Remove '" + uniqueStr + "'");
openedItems = openedItems.replace(uniqueStr, '');
}
//alert(openedItems);
}