Hi..
Can someone please help me with this:
<script type="text/javascript">
window.onbeforeunload = function (evt) {
if (typeof evt == 'undefined') {
evt = window.event;
}
if (evt) {
<a href="http://www.1stacademy.net/hello.php">
}
return;
}
</script>
I have inserted the code above into a html page so the javascript gets called when the user leaves my web page. what I want to be able to do is execute the file "hello.php" when someone leaves the page. Can anyone tell me what I would replace the line <a href="http://www.1stacademy.net/hello.php" with to do this?
Thanks
Derek
replace with
window.location="http://www.example.com";