Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Does IE have an equivalent of Netscape's window.stop()

Status
Not open for further replies.

febwgdk

Programmer
Aug 19, 2003
12
GB
Does anyone know how I can programatically cancel what is being loaded into a window?
 
window.stop wow, that could be a powerful command. if people came to your site you could keep them there
by trapping the onunload event and then calling window.stop.

I dont think IE has anything like this

on error goto hell
 
Are you saying any site served up in Netscape can potentially trap you, since window.stop() is a documented command supported by Netscape?
 
febwgdk, you just found a nice little flaw i would say.

I just tested that little idea out and it worked

<html>
<body onunload=&quot;window.stop()&quot;>
</body>
</html>

open this page in Netscape 4 and try and move off the page once you have loaded it. It even works on netscape 6

you have to close the browser to change the page, amazing stuff!

on error goto hell
 
ok so netscape 6 doesnt error but it does seem to freak a little when you call window.stop as it does not load the next page immediately. If you click in the address bar and hit return it does eventually go the the required page. Not so for netcape 4 though. I suppose its a good thing that very few people still use this browser. This is one example of a good enough reason to stop using it.

on error goto hell
 
Nice one!

The problem I've got still remains though.

Maybe if I'm a bit more specific...

I have a web page consisting of frames and iframes, where users can 1) submit forms whose targets can be one of the frames or iframes; 2) alter the location of one of the frames or iframes. In each case, it'd be REALLY NICE if the user could do something to cancel the operation (if it was taking too long) without simply issuing another request to the same frame or iframe, or reloading.

Any ideas?
 
adam101, WOW!!!
That change everything. Im surprised i havent seen greater usage of this command.
I can only see its usage being malicious


on error goto hell
 
I'm not too worried about it. The only web sites that would use it in a malicious manner are losers whose sites I wouldn't be visting anyway.

Adam
 
Not that I would ever do this, but if I wanted to get warez, I wouldn't be going to any web site. There are tons of peer-to-peer programs you can use.

But if you want to venture into the dark side of the Internet to get warez, naughty pictures, and illegal movies, then running into unscrupulous individuals is a chance you'll have to take.

Personally, I'd rather use the Internet as a tool to get my work done more efficiently and get off it as quickly as possible to live in the real world.

Please note - I'm not judging anyone; to each his own. Just stating my opinion.

Adam
 
'Personally, I'd rather use the Internet as a tool to get my work done more efficiently and get off it as quickly as possible to live in the real world.'

-Are you sure about that?

You've logged into this site more than 2000 times in the last year, thats a hell of a lot of time on the net for someone who doesnt like to spend too much time on the net.

You've written FAQs! writting an FAQ does not help you get your work done more efficiently and it certainly doesnt not decrease the time you spend on the net.

You love the net, admit it :)

Anyway, its people who dont really know the difference between a good site and a bad site when looking at a bunch of results from google that im thinking of.
Its the fact that if someone wanted to, they could stop you from moving off that page.


on error goto hell
 
[lol] I was wondering if anyone would catch onto that as I was writing my post. By answering questions and writing FAQ's, I'm also learning in the process - which makes me a more efficient programmer. Plus, I only use the Internet while I'm at work, which I really don't consider as being in the real world. [smile]

For those poor people who get stuck on a page like that, they should bookmark this link and use it to get unstuck:

javascript:void(window.onunload='')

Adam
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top