Advanced Search

Results 1 to 2 of 2

Thread: script causing security problems

  1. #1
    Join Date
    Oct 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default script causing security problems

    <a href="javascript:window.close()">close this window</a>

    This short line which was used in many scripts is now causing errors in Foxfire and IE. Please help me with what I need to change. TIA

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,677
    Thanks
    43
    Thanked 3,126 Times in 3,092 Posts
    Blog Entries
    12

    Default

    In modern browsers you can only close a window using javascript if you opened that window using javascript. In IE, there is a kludge:

    Code:
    <a href="javascript:window.opener=self;window.close()">close this window</a>
    But this will not fool FF. I have no idea what devious minds found a way to exploit the window.close() method on non-javascript generated windows for personal gain or malicious purposes or what those objectives were but, apparently it has happened enough times that we are now left without this handy tool except for windows we've created using javascript.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •