aspose file tools*
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
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: 819
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: 819
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: 819
Never mind. Worked fine. Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Check and Replace Parent Page