Results 1 to 2 of 2

Thread: Does window.stop() work in IE?

  1. #1
    Join Date
    Nov 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Does window.stop() work in IE?

    I am trying to use Javascript to stop a web page processing a search when the user hits a cancel button. In Netscape, window.stop() seems to work (in the same way as the Stop button on the browser I guess). However, this does not work in IE. Is there any other method that can be used to get the same result?

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    You could try IE's command:

    Code:
    document.execCommand('Stop')
    which supposedly simulates window.stop(). In IE7, this works for example:

    Code:
    <a href="#" onClick="document.execCommand('Stop'); return false">Stop</a>
    
    <p>
    <iframe src="http://engadget.com"></iframe>
    </p>

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
  •