Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Community Discussions (All other subjects)
 onLoad code
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Mr Pink
Junior Member

United Kingdom
387 Posts

Posted - 15 May 2004 :  05:41:58  Show Profile  Visit Mr Pink's Homepage  Send Mr Pink an AOL message
Someone posted this code to my website guestbook, what would the code do if I let it get through?

quote:
body onLoad="location.reload()" onUnLoad="window.open(self.location()); document.write("Error"

Martin
Leyland Forum Leyland Lancashire UK

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 31 May 2004 :  11:46:08  Show Profile
That would cause a continuous reload loop. the onload handler (calls a function when all elements of a page have loaded) is telling the page to reload itself. Once reloaded it would reload again and again ad infinitum. The onunload handler (calls a function when the visitor navigates to another page or closes the window) is telling the browser to open a new window containing the same page thus starting the reload loop all over again.


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.34 seconds. Powered By: Snitz Forums 2000 Version 3.4.07