I have the following to show/hide Divs. This is fine, but I'm using
XSL to generate a page per person (for eample). As the div's are
declared statically when there is more than one person, the div id is
nolonger unique.
Would I be able to something similar to what is below using classes, or
will I have to dynamically create the div's giving them unique ID's
Many thanks
S
function hidediv(strdivname)
{
document.getElementById(strdivname).style.display= 'none'
}
function showdiv(strdivname)
{
document.getElementById(strdivname).style.display= 'block'
}
function togglediv(strdivname)
{
if (document.getElementById(strdivname).style.display == 'none')
{
showdiv(strdivname)
}
else
{
hidediv(strdivname)
}
}