Link to home
Start Free TrialLog in
Avatar of rag2000
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.
Avatar of a.marsh
a.marsh

You mean you don't want the right hand page to be displayed without the left hand frame?

Ant
ASKER CERTIFIED SOLUTION
Avatar of a.marsh
a.marsh

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi,

you can try this in the right frame:

<script language="javascript">
 if(document.parent == null)
    document.location.href="your_frame_page.htm";
</script>


this will check whether there is a frame if not it will redirect to the frame page.