faqts : Computers : Programming : Languages : JavaScript

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

23 of 47 people (49%) answered Yes
Recently 2 of 10 people (20%) answered Yes

Entry

How do I stop a page loading when it starts loading from the server.

Apr 7th, 2008 23:22
ha mo, Sebastien Boisvert, Abraham N., http://faqts.com/knowledge_base/view.phtml/aid/1792


Assuming you don't have control of the new page that gets loaded, you 
can simply use an onunload event to stop the window from loading the 
new page when the current one gets unloaded:
<body onunload="window.stop">
If you want to submit something but don't want the baggage of the 
response, you can use this method:
<body onload='document.forms[0].submit()' onunload='window.stop'>
<form>
<!-- your form inputs -->
</form>
</body>
Both would normally result in a blank page in the client.
http://www.businessian.com
http://www.computerstan.com
http://www.financestan.com
http://www.healthstan.com
http://www.internetstan.com
http://www.moneyenews.com
http://www.technologystan.com
http://www.zobab.com
http://www.healthinhealth.com