rag2000
asked on
Frame it on the fly
I have a framed site, with a left frame and a right frame. The left frame displays the contents page and the right page displays the page depending on the link clicked in the left frame.
If a person opens the right frame page directly by typing the url in his/her browser, the page obviously will open with the frames.
I wish to make sure that even if the person does that, the frames are built on the fly, again with the left frame containing the contents page and the right page containing the page that has been called.
I hope I am clear enough and am lookking for javascript coding to do this.
If a person opens the right frame page directly by typing the url in his/her browser, the page obviously will open with the frames.
I wish to make sure that even if the person does that, the frames are built on the fly, again with the left frame containing the contents page and the right page containing the page that has been called.
I hope I am clear enough and am lookking for javascript coding to do this.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi,
you can try this in the right frame:
<script language="javascript">
if(document.parent == null)
document.location.href="yo ur_frame_p age.htm";
</script>
this will check whether there is a frame if not it will redirect to the frame page.
you can try this in the right frame:
<script language="javascript">
if(document.parent == null)
document.location.href="yo
</script>
this will check whether there is a frame if not it will redirect to the frame page.
Ant