M
mooeypoo
Hello all,
I'm a php developer. I have been using a very simple script to
hide/unhide divs in my script:
function DisplayI(obj)
{
obj.style.display=("none"==obj.style.display? "block" : "none");
}
the Div tag, looks like this:
<div id="blabla" style='display:hidden;'>
the ID of the Div is being compiled by a php script linked to a
Database (therefore, all DIVs get different ids).
It works perfectly in I.E, but in mozilla (firefox and netscape) it
doesn't.
If I change "display:hidden" to "display:block", it shows them open
completely (without hiding) throughout mozilla and I.E together.
I'm looking for a script that hide and unhides my divs and works in a
crossbrowser environment.
I've seen codes to solve the crossbrowser thing, but all of them
seperated "hidediv" and "showdiv" to two functions, and I need them
unified - the code to figure out if the div is shown and hide it, and
the other way around.
Can anyone please help me with this?
Thanks a lot!
~mooey
I'm a php developer. I have been using a very simple script to
hide/unhide divs in my script:
function DisplayI(obj)
{
obj.style.display=("none"==obj.style.display? "block" : "none");
}
the Div tag, looks like this:
<div id="blabla" style='display:hidden;'>
the ID of the Div is being compiled by a php script linked to a
Database (therefore, all DIVs get different ids).
It works perfectly in I.E, but in mozilla (firefox and netscape) it
doesn't.
If I change "display:hidden" to "display:block", it shows them open
completely (without hiding) throughout mozilla and I.E together.
I'm looking for a script that hide and unhides my divs and works in a
crossbrowser environment.
I've seen codes to solve the crossbrowser thing, but all of them
seperated "hidediv" and "showdiv" to two functions, and I need them
unified - the code to figure out if the div is shown and hide it, and
the other way around.
Can anyone please help me with this?
Thanks a lot!
~mooey