hessfirm1
asked on
Firefox won't process frames['frame1'].location.href = toLocation;
having a challenge getting Firefox to work with the following javascript...it's a rado button that opens two frames:
<script type="text/javascript">
function frame1(toLocation)
{
frames['frame1'].location.href = toLocation;
}
</script>
<script type="text/javascript">
function frame2(toLocation)
{
frames['frame2'].location.href = toLocation;
}
</script>
<input type="radio" checked value="1" onClick="frame1('myaddress.asp?b=<%=Request.QueryString("b")%>;frame2('myaddress2.asp?b=<%=Request.QueryString("b")%>');" name="inlinedisplay">
ASKER
here's the code with the frames....it works in IE, but in firefox, the radio buttons don't do anything. Thanks!
<script type="text/javascript">
function frame1(toLocation)
{
frames['frame1'].location.href = toLocation;
}
</script>
<script type="text/javascript">
function frame2(toLocation)
{
frames['frame2'].location.href = toLocation;
}
</script>
<input type="radio" checked value="1" onClick="frame1('myaddress.asp?b=<%=Request.QueryString("b")%>;frame2('myaddress2.asp?b=<%=Request.QueryString("b")%>');" name="inlinedisplay">
<iframe id="frame1" src="myurl" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" style="overflow:visible; width:100%; display:none" target="_self"></iframe>
<iframe id="frame2" src="myurl2" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" style="overflow:visible; width:100%; display:none;"></iframe>
So do what I suggested
change
id="frame1" to name="frame1"
change
id="frame1" to name="frame1"
ASKER
hmmm....by making it name="frame1" versus id="frame1" the frames don't open at all in firefox w/ or w/out the radio buttons.
ASKER
hang in there...i'm reading that this might be a firefox radio button issue...i'll update this shortly.
You also need to close the bracket
<input type="radio" checked value="1" onClick="frame1('myaddress .asp?b=<%= Request.Qu eryString( "b")%>;
should be
<input type="radio" checked value="1" onClick="frame1('myaddress .asp?b=<%= Request.Qu eryString( "b")%>');
<input type="radio" checked value="1" onClick="frame1('myaddress
should be
<input type="radio" checked value="1" onClick="frame1('myaddress
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If you only have ID="frame1" you need document.getElementById('f
but for compatibility with older browser use NAME="frame1"
and window.frames["frame1"].lo