OK I am using ajax to load different pages. But once one page is navigated away from I want to run a function. How would I do this without the body tag??
Thanks.
OK I am using ajax to load different pages. But once one page is navigated away from I want to run a function. How would I do this without the body tag??
Thanks.
onunload, or onbeforeunload
How would I do this without access to the body tag?
Perhaps something like...
<script type="text/javascript">
function GoodBye() {
alert('Bye!');
}
window.onunload = GoodBye;
</script>
Window doesn't work either unfortunately because it is ajax I am using and I want it to change every time the the part of the page gets navigated away from. Anyway I have a solution now anyway. Every time it changes.
Thanks for the replies.
Don't forget to mark this thread resolved... and consider posting the solution so that others may benefit from this thread.
Just put the function call into your Ajax script. When one gets called, the other will.
Thanks. I did something very similar. Resolved!