Hi - I have a function which shows/hides a <div> on my page - this
appears to oinly work in IE, but I also need it to work in Netscape 7.1.
My function is in my head:
function openIt(faq) {
showIt = document.all(fa q);
if (showIt.style.d isplay == "none") {
showIt.style.di splay = ""
} else {
showIt.style.di splay = "none"
}
}
...and the onclick code is:
<a href="#" onclick="Javasc ript:openIt('22 list'); return false;">click
here to toggle</a>
<div id="22list" style="display: none">
This will show/hide when you click the above link
</div>
Could anyone help amend the function to run in both IE and Netscape?
Thanks for any help,
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
appears to oinly work in IE, but I also need it to work in Netscape 7.1.
My function is in my head:
function openIt(faq) {
showIt = document.all(fa q);
if (showIt.style.d isplay == "none") {
showIt.style.di splay = ""
} else {
showIt.style.di splay = "none"
}
}
...and the onclick code is:
<a href="#" onclick="Javasc ript:openIt('22 list'); return false;">click
here to toggle</a>
<div id="22list" style="display: none">
This will show/hide when you click the above link
</div>
Could anyone help amend the function to run in both IE and Netscape?
Thanks for any help,
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Comment