Travman
10-08-2003, 12:19 PM
I need some expert help in writing a javascript that will force pages to always load in my IFRAME element.
I am loading and displaying pages created by another department, and I cannot influnce the code they're using.
Their page includes a number of javascripted hyperlinks using: onclick="parent.location='URL';"
This has the affect of breaking the linked page out of my navigation page. My navigation page consists of a frame set, the header page is a set of Java Applets that provide the hierarchal navitgation menus, and the main frame is a container page with an IFRAME that hold the other department's page.
I need to do any one of the following:
1) store a javascript in the header, the frameset, or the container page that prevents the frameset from being replaced with another page even if they have used hte above code
2) maybe use a series of nested iframes with code that says "if the iframe inside the iframe is replaced with a page, rebuild the container page so the destination of the link is displayed inside two nested iframes again." (I just don't know how to capture the destination of the link so I can tell the JS what to load in the IFRAMES.)
3) check the unload event, determine if it's being loaded as a _parent or location.top and ignore that part of the link code by retargeting back to the IFRAME.
I have seen a lot of code to prevent people from stealing your page. This is kind of the opposite of that.
Thanks,
-TravMan
I am loading and displaying pages created by another department, and I cannot influnce the code they're using.
Their page includes a number of javascripted hyperlinks using: onclick="parent.location='URL';"
This has the affect of breaking the linked page out of my navigation page. My navigation page consists of a frame set, the header page is a set of Java Applets that provide the hierarchal navitgation menus, and the main frame is a container page with an IFRAME that hold the other department's page.
I need to do any one of the following:
1) store a javascript in the header, the frameset, or the container page that prevents the frameset from being replaced with another page even if they have used hte above code
2) maybe use a series of nested iframes with code that says "if the iframe inside the iframe is replaced with a page, rebuild the container page so the destination of the link is displayed inside two nested iframes again." (I just don't know how to capture the destination of the link so I can tell the JS what to load in the IFRAMES.)
3) check the unload event, determine if it's being loaded as a _parent or location.top and ignore that part of the link code by retargeting back to the IFRAME.
I have seen a lot of code to prevent people from stealing your page. This is kind of the opposite of that.
Thanks,
-TravMan