How To Get: <body onunload="MainGoodBye()">

darrenhallinan 29 Feb, 2012
Hello

I am using a script on one of my forms to guide users to another page on my site.

to use the script I need to have my body tag looking like this:

<body onunload="MainGoodBye()">


I have had a look around the fourms and have tried this:

tried adding this to a JS wizard box:


window.addEvent('load', function() {
onunload="MainGoodBye()"
}); 

but it did not work

anyone have any ideas? im sure its easy!. . as is everything when you know how to do it!
GreyHead 29 Feb, 2012
Hi darrenhallinan ,

Why not just redirect them?

Try
window.addEvent('unload', MainGoodBye()); 


Bob
This topic is locked and no more replies can be posted.