Solved

Frame it on the fly

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Today I would like to talk about localizing (Internationalization) JavaScript applications. Introduction When creating an application that is going to be used by many people around the globe, it is important to remember that not everyone speak…
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
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…

762 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now