• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 298
  • Last Modified:

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.
0
rag2000
Asked:
rag2000
  • 2
1 Solution
 
a.marshCommented:
You mean you don't want the right hand page to be displayed without the left hand frame?

Ant
0
 
a.marshCommented:
I think you'll find this article right up your street:

http://tech.irt.org/articles/js126/index.htm

:o)

Ant
0
 
ykf2000Commented:
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.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now