Send to a Friend

stephen's avatar

My JavaScript code doesn't work in Firefox?

Asked by stephen (351points) January 22nd, 2008

————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>

Using Fluther

or

Using Email

Separate multiple emails with commas.
We’ll only use these emails for this message.