To become more familiar with Javascript, I've been trying to put a nice exit popup on my website, I ended up choosing this one from DD mainly because it looked so good right out of the box: http://www.dynamicdrive.com/dynamici...terstitial.htm (Interstitial Content Box (v1.1))
However, my attempts to edit the script's interstitial.js file so that it only loads on exit of the page have, well, not got me quite to that point
I've been reading (via tutorials, looking at other scripts, searching previous answers on SS) that I should be putting this sort of thing in an unLoad event on the body tag of my website. But I have 3 specific questions that I would love to get your feedback on so that I might get this working.
1) I believe the line "page_request.onreadystatechange=function()" is where it actually calls the thing to load, is that right? So I think this is the sort of area where I should be changing it. At least the handful of lines above it, I'm sure that's where it's deciding if to load.
2) Some tutorials for exitpop scripts mention that it's old hat to be using the unload thing on a body tag, but I can't find one that suggests to use a better alternative (I did find one site but it required registration to read their forum, and it rejected my email to register there) - what is considered a better way to check "user is going to an external site"?
3) I do wonder what happens if someone has cookies disabled, like on my local library's computer, which spits out an error when cookies are needed by websites. I can test this later, but was just wondering.
I guess question1 is really the important one
![]()
Bookmarks