This page has moved. You will be automatically redirected to its new location in 10 seconds. If you aren't forwarded to the new page, click here.

Search This Blog

Wednesday, July 1, 2009

Hidden div not displaying in Firefox (display:none)

Don't use:

var obj=document.getElementById('divname');
if (obj.style.display=='none'){obj.style.display="";}

(the above works only in IE, not in firefox)
Instead; use:

document.getElementById('divname').style.display="";
(the above works both in firefox n IE)

No comments:

Post a Comment