General Question
My JavaScript code doesn't work in Firefox?
————frames—————
<frameset cols=”,100,” frameborder=“no” border=“0” framespacing=“0” id=“alls”>
<frame src=“http://www.google.com” name=“leftFrame” id=“leftFrame” />
<frame src=“menu.html” name=“mainFrame” id=“mainFrame” />
<frame src=“http://www.yahoo.com” name=“rightFrame” id=“rightFrame” />
</frameset>
<noframes><body>
</body>
</noframes>
————menu.html————-
<script type=“text/javascript”>
function change(dic)
{
var cons=parent.document.getElementById(“alls”).cols;
if(dic==“left”)
{
if(cons==”,100,”)
cons=“0,100,*”;
else
if(cons==”*,100,0”)
cons=“0,100,*”;
else
if(cons==“0,100,*”)
cons=”,100,”;
}
if(dic==“right”)
{
if(cons==”,100,”)
cons=”*,100,0”;
else
if(cons==”*,100,0”)
cons=”,100,”;
else
if(cons==“0,100,*”)
cons=”*,100,0”;
}
parent.document.getElementById(“alls”).cols=cons;
}
</script>
…........
<div> <a href=”###” onclick=“change(‘left’)”>left open/close</a></div>
<div><a href=”###” onclick=“change(‘right’)”>right open/close</a> </div>
4 Answers
Answer this question
This question is in the General Section. Responses must be helpful and on-topic.