Reputation: 22568
The following script works fine in IE7 but fails to execute in Firefox 3. The div tag which was display: none; shows in IE but never in FF. I am not a client / javascript guy... thanks.
<script type="text/javascript">
//<![CDATA[
document.getElementById("Fred1_Panel").style.setAttribute("display","inline");//]]>
</script>
Upvotes: 0
Views: 519
Reputation: 35400
This code should work:
document.getElementById("Fred1_Panel").style.display = "inline";
In general if you encounter problems in Firefox you can easily discover the exact problem (and maybe find out the solution) using Firebug plugin or simply seeing at the Error console.
Upvotes: 1
Reputation: 109005
In FF, starting with either Tools | Error Console, or FireBug's console is a good way to see what errors are occurring.
Upvotes: 2
Reputation: 10764
try this:
document.getElementById("Fred1_Panel").style.display = '';
OR
document.getElementById("Fred1_Panel").style.display = 'inline';
Upvotes: 6
Reputation: 211982
This will work in both browsers:
document.getElementById("Fred1_Panel").style.display = 'inline';
Upvotes: 4