Solved

Frame it on the fly

Posted on 2001-06-10
3
268 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
  • 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
execute script based on HTML event 7 23
simple javascript form validation 2 20
jquery datepciker end date add 6 days 6 39
Index on a Table 6 15
Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
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…

809 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