This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Check and Replace Parent Page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Check and Replace Parent Page" Watch "Check and Replace Parent Page" New topic
Author

Check and Replace Parent Page

Rob Hunter
Ranch Hand

Joined: Apr 09, 2002
Posts: 805
I have a page that will have 2 frames (one which will hold a page with a form and the other there'll be nothing in it). If someone decides to load the page with the form directly I want to have a javascript on this page and check if it is the parent. If so, then I want to replace the page with the page with the frames set up. Anyone have any suggestions for this? Thanks in advance.

Rob
Yuriy Fuksenko
Ranch Hand

Joined: Feb 02, 2001
Posts: 413
if (self==top) location.href="url";
Rob Hunter
Ranch Hand

Joined: Apr 09, 2002
Posts: 805
Didn't seem to work... Does it get put in exactly as you had wrote? Thanks for the reply.

Rob
Rob Hunter
Ranch Hand

Joined: Apr 09, 2002
Posts: 805
Never mind. Worked fine. Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Check and Replace Parent Page
 
Similar Threads
Writing with one servlet in two different frames
Combining two frames into one page
disable frame when working with other frames
Frame in JSP repeats twice
html:errors and frames