Script to test if document opened in frame?

by David Jones <dvjones(at)ksbe.edu>

 Date:  Wed, 13 Aug 2003 15:13:05 -1000
 To:  hwg-techniques(at)hwg.org
  todo: View Thread, Original
Is there a simple Javascript function I can use (in a 
clickable link) to (1) determine if the document 
containing the link is inside a frame, and (2) if so, open 
the linked document in the frame's parent window? Like 
those frame-breaking scripts, I guess, but one called by 
a click, not automatically.

Sorry, I'm no Javascript programmer. The intranet site 
I'm working on is entirely frameless except for one 
page, which needs to be in frames for backwards 
compatibility (it pulls in a backend web application, I'd 
normally use an IFRAME, but our NS4 users can't see 
anything in an IFRAME).

Thanks in advance for any help!

David
dvjones(at)ksbe.edu
 

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA

This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.