benniaustin
02-26-2007, 10:27 PM
Hey all, I need a bit of help.
The client is requesting a wait don't leave drop in, much like a wait don't leave popup that presents the user with a deal using the onUnload event in javascript. At first I thought this was impossible, but now it seems almost possible.
I've created the dhtml drop-in using javascript function on on the onbeforeUnload event attached to the body, then, used one of these guys for on the unload: document.execCommand('Stop');. I'm aware that this only will work in ie, and the client is fine with that. (90%+ users are using IE on this site).
The problem here is that I need to capture the url they were about to go to, so I can add that to a link on the drop in. As it is right now, this code makes it impossible for IE users to leave the site. The drop in will have a special offer, with a "buy now" link and a "leave the page" link. I need that "leave the page" link to go to whatever link they were going to go to.
Is there any way to capture this information? Just getting the info from links on the page, should not be to difficult, but all of the links on the page will have the dropin suppressed anyway, that's now what I need. I need to capture the url if it is typed into the address bar, or accessed from a bookmarked link.
The client is requesting a wait don't leave drop in, much like a wait don't leave popup that presents the user with a deal using the onUnload event in javascript. At first I thought this was impossible, but now it seems almost possible.
I've created the dhtml drop-in using javascript function on on the onbeforeUnload event attached to the body, then, used one of these guys for on the unload: document.execCommand('Stop');. I'm aware that this only will work in ie, and the client is fine with that. (90%+ users are using IE on this site).
The problem here is that I need to capture the url they were about to go to, so I can add that to a link on the drop in. As it is right now, this code makes it impossible for IE users to leave the site. The drop in will have a special offer, with a "buy now" link and a "leave the page" link. I need that "leave the page" link to go to whatever link they were going to go to.
Is there any way to capture this information? Just getting the info from links on the page, should not be to difficult, but all of the links on the page will have the dropin suppressed anyway, that's now what I need. I need to capture the url if it is typed into the address bar, or accessed from a bookmarked link.