Link to home
Start Free TrialLog in
Avatar of hankknight
hankknightFlag for Canada

asked on

style.display = "table-row" - IE6 error

Hello,

This does not work with IE6 (it gives an error)
         new_value = "table-row";
         document.getElementById("pageHeader").style.display = new_value;

And looks very poorly formated in FF:
         new_value = "block";
         document.getElementById("pageHeader").style.display = new_value;

         
Any ideas?
SOLUTION
Avatar of Yury Merezhkov
Yury Merezhkov
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jaanise
jaanise

An empty string may not work if "none" is set for display property in a CSS style sheet.

Setting display to "" will reset only element's inline style display value. If some CSS rule applies to the element, then resetting the inline value will enable that CSS rule. If it was defined so that the element is not to be displayed, then switching between 'none' and '' will give no result (the element will remain hidden).