Hi am new to javscript.Am trying to display a row when a radio button is clicked and hide some oother row whena button is clicked.Using style.display.I t works fine in IE but creates probem in Firefox..Please help me
Display problem in firefox
Collapse
X
-
Originally posted by ParzHi am new to javscript.Am trying to display a row when a radio button is clicked and hide some oother row whena button is clicked.Using style.display.I t works fine in IE but creates probem in Firefox..Please help me
Can you post the function here? We can have a better idea. -
You should really post some code, but anyway, your problem might be that you use the display property like this:
to show:
style.display = "block";
to hide:
style.display = "none";
but that doesn't work for elements such as TR because the default display of a TR element is not block.
You should use instead:
to show:
style.display = "";
to hide: (it's the same)
style.display = "none";
I advise you to use style.visibilit y along with style.display.
Hope this helps!
Cheers...Comment
-
Hey this is the function that i used to change the display
Code:function overseas() { document.getElementById('Country').style.display= this.checked?'none':'inline'; document.getElementById('th1').style.display = this.checked?'none':'inline'; document.getElementById('State').style.display = this.checked?'inline':'none'; document.getElementById('City').style.display = this.checked?'inline':'none'; document.getElementById('th2').style.display = this.checked?'inline':'none'; document.getElementById('th3').style.display = this.checked?'inline':'none'; }
Comment
-
Comment