I was trying to find out if there is a way to triger a event when then the user leaves the web site
I have looked in unload on a frame but that it not working from a SEO stand point and site user friendly
Thanks
When I leave a site
Moderator: General Moderators
- moiseszaragoza
- Forum Commoner
- Posts: 87
- Joined: Sun Oct 03, 2004 4:04 pm
- Location: Ft lauderdale
- Contact:
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
- jyhm
- Forum Contributor
- Posts: 228
- Joined: Tue Dec 19, 2006 10:08 pm
- Location: Connecticut, USA
- Contact:
Everah wrote:Javascript, I believe is the only way to determine loss of focus or the movement away from a site.
Code: Select all
<script type="text/javascript" language="Javascript">
<!-- Hide from older browsers
window.onunload=laterDude;
function laterDude() {
alert("Yo! You leaving? Hmmf, like I care, later dude!");
}
// Stop Hiding -->
</script>- moiseszaragoza
- Forum Commoner
- Posts: 87
- Joined: Sun Oct 03, 2004 4:04 pm
- Location: Ft lauderdale
- Contact:
- jyhm
- Forum Contributor
- Posts: 228
- Joined: Tue Dec 19, 2006 10:08 pm
- Location: Connecticut, USA
- Contact:
Mmmm, not sure. Anything to do with the window is clientside thus delt with by javascript. Maybe some sort of session class but that depends on what exactly you are doin. Of course I might be speakin' out my arse.moiseszaragoza wrote:by any chance do you know how to check when they are leaving the site not each page
thanks