|
uCoz Community Archives Locked Pop up window. |
Pop up window. |
I hope moderators won't hate me for being so annoying, but i have a question. How do i create a pop up window that appears when somebody is leaving my site? I found this info (posted by Sunny):
Code We need the following part which is the code of an Ajax window itself: where: Window title – is a title that is displayed at the top of an Ajax window; 500 – width; 200 – height; Here goes window content- is content of a window. Here HTML codes can be used. Ok. this is a code for a blue pop up window. It will appear as a link on the page, but it it possible to have this window pop up when the visitor leaves my site? |
You can use basic internet pop-up windows, but I'm not so sure about loading the Ajax Window on an unload function (leaving the page). Here is the basic HTML script, replace the body tag with the following:
Code <body onunload="alert('Are you sure you want to navigate away from this page?')"> You can change the Are you sure you want to navigate away from this page? text to what you want. |
CreativeCollusions, that's exactly what i'm looking for, BUT... is it possible to have one of my polls displayed in that window? I tried just to create a poll and then replace"Are you sure you want to navigate away from this page?" with $POLLC_3$ ...didn't work. I just want people to be able to answer 1 question before they leave my site.
I would really appreciate your help : ) |
KatrinL, an alternative you can do is ask the user if he / she wants to answer your poll. Then if the user agrees, take them to a seperate page that contains your poll. As far as I know, JavaScript alert(); windows can't carry HTML in it. Just plain text.
"Friends don't let friends use Internet Explorer 6." - Microsoft || Join the cause. Help your friends.
|
| |||
| |||