Hi,
I am a designer with a little programming experience and I have cobbled together some javascript that toggles the alternating visibility of two divs.
It works fine in all browsers I've tested except firefox.
What am I doing wrong for firefox?
Here's the code :-
<script type="text/JavaScript">
<!--
function toggle () {
if (Graphic_Div.style.display == "none") {
Graphic_Div.style.display = '';
Help_Pages_Div.style.display = 'none';
}
else {
Graphic_Div.style.display = 'none';
Help_Pages_Div.style.display = '';
}
}
//-->
</script>
<div id="Graphic_Div">
<div align="center" class="Show_Help_Pages">
<div align="right">
<a href="javascript:toggle()">SHOW HELP FILES</a><br /><br/></div>
<p> </p>
<p><img src="images/Select_a_page_from_admin.gif" width="350" height="187" /></p>
</div>
</div>
<div id="Help_Pages_Div" style="display:none;">
<div align="center" class="Hide_Help_Pages">
<div align="right"><a href="javascript:toggle()">HIDE HELP FILES</a><br/><br/>
</div>
</div>
<iframe src="Help_Files/Help_Index.html" width="620" height="600"></iframe>
</div>
Thanks in advance if you decide to help.
Cheers
Greg
I am a designer with a little programming experience and I have cobbled together some javascript that toggles the alternating visibility of two divs.
It works fine in all browsers I've tested except firefox.
What am I doing wrong for firefox?
Here's the code :-
<script type="text/JavaScript">
<!--
function toggle () {
if (Graphic_Div.style.display == "none") {
Graphic_Div.style.display = '';
Help_Pages_Div.style.display = 'none';
}
else {
Graphic_Div.style.display = 'none';
Help_Pages_Div.style.display = '';
}
}
//-->
</script>
<div id="Graphic_Div">
<div align="center" class="Show_Help_Pages">
<div align="right">
<a href="javascript:toggle()">SHOW HELP FILES</a><br /><br/></div>
<p> </p>
<p><img src="images/Select_a_page_from_admin.gif" width="350" height="187" /></p>
</div>
</div>
<div id="Help_Pages_Div" style="display:none;">
<div align="center" class="Hide_Help_Pages">
<div align="right"><a href="javascript:toggle()">HIDE HELP FILES</a><br/><br/>
</div>
</div>
<iframe src="Help_Files/Help_Index.html" width="620" height="600"></iframe>
</div>
Thanks in advance if you decide to help.
Cheers
Greg