Solved

Frame it on the fly

Posted on 2001-06-10
3
284 Views
Last Modified: 2008-03-06
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
Comment
Question by:rag2000
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 15

Expert Comment

by:a.marsh
ID: 6172925
You mean you don't want the right hand page to be displayed without the left hand frame?

Ant
0
 
LVL 15

Accepted Solution

by:
a.marsh earned 100 total points
ID: 6172940
I think you'll find this article right up your street:

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

:o)

Ant
0
 
LVL 4

Expert Comment

by:ykf2000
ID: 6173267
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question