I have a page with two frames. The top one has a button that when pressed, I want it to get the url of the bottom frame. The problem is that I want to use the bottom frame to navigate to other sites and domains.
Frameset:
<frameset rows="20%,*">
<frame name="topbar" src="top.cfm" marginwidth="1" marginheight="1" scrolling="no" frameborder="0" noresize>
<frame name="bottombar" src="bottom.cfm" marginwidth="1" marginheight="1" scrolling="auto" frameborder="0">
</frameset>
The top frame:
<script language="JavaScript">
function getURL(){
document.formgo.thisurl.value = top.frames.bottombar.location.href;
}
</script>
<input type="button" value="Get URL" onClick="getURL();">
<input type="text" size="40" name="thisurl" value="" maxlength="255">
The bottom frame could have a location of anywhere. The above script works when the location of the bottom frame has the same domain as the domain of frameset.
I am willing to try anything so even if your idea is a bit off the wall, go for it.
Thanks,
T1m
Frameset:
<frameset rows="20%,*">
<frame name="topbar" src="top.cfm" marginwidth="1" marginheight="1" scrolling="no" frameborder="0" noresize>
<frame name="bottombar" src="bottom.cfm" marginwidth="1" marginheight="1" scrolling="auto" frameborder="0">
</frameset>
The top frame:
<script language="JavaScript">
function getURL(){
document.formgo.thisurl.value = top.frames.bottombar.location.href;
}
</script>
<input type="button" value="Get URL" onClick="getURL();">
<input type="text" size="40" name="thisurl" value="" maxlength="255">
The bottom frame could have a location of anywhere. The above script works when the location of the bottom frame has the same domain as the domain of frameset.
I am willing to try anything so even if your idea is a bit off the wall, go for it.
Thanks,
T1m