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?

hi,

IE4+ doesn't support the
window.stop
method. Instead, the
document.execCommand
method has an (previously) undocumented argument called Stop, which
allows you to call
document.execCommand('Stop')
to get the same effect as
window.stop()
in Netscape.

It should be noted that using this repeatedly in IE 5.x (especially
within frames) can cause a browser crash.

see this http://www.faqts.com/knowledge_base/view.phtml/aid/1792

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.