pop up
I want to run a one week "exit on browser" popup that will ask questions to the potential poll(er. I'd like this pop up to occur when a visitor closes the browser or leaves the site via a link or entering another URL. Can anyone help. I know there are other ways of going about getting this info, but this is the way we want to do it. It's only going to run for one week. Any help is
Webmaster Resources .::. Webmaster Forums .::. Fuel Saver
Suzanne posted this at 03:01 — 12th June 2003.
She has: 5,507 posts
Joined: Feb 2000
There are two parts here -- which do you want answered?
1. How to make a window popup on exit?
A: onload(); in the body element. This is JavaScript, not server-side coding.
2. Scripting a poll
A: Depends on what you want to do with the information, server-side coding, and mail results or insert them into a database or both.
ronhollin posted this at 03:08 — 12th June 2003.
They have: 121 posts
Joined: Apr 2003
Oh yes, sorry. Either one is fine. I'd rather have #2 if at all possible. Then I can check every so often to see the results. Does that make since?
Webmaster Resources .::. Webmaster Forums .::. Fuel Saver
Suzanne posted this at 14:11 — 12th June 2003.
She has: 5,507 posts
Joined: Feb 2000
... no, that doesn't really make sense.
There are two PARTS. It's not an either/or situation. You can have the poll on your page or in a popup (part i), and then, how will you get the information from the poll (part ii).
Suzanne posted this at 15:05 — 12th June 2003.
She has: 5,507 posts
Joined: Feb 2000
Also, you may want to reconsider using a popup at all -- http://www.zeldman.com/daily/0603a.shtml#autopop
Many users choose to block popups.
ronhollin posted this at 15:13 — 12th June 2003.
They have: 121 posts
Joined: Apr 2003
That's fine. I'm just looking for some feedback. If they happen to block it, fine. They'll never see my company. This just means that it might take a little longer than I expected to get the results I want. Plus how many people us Mozilla? Not very many.
So what are those steps again?
Webmaster Resources .::. Webmaster Forums .::. Fuel Saver
The Webmistress posted this at 15:30 — 12th June 2003.
She has: 5,586 posts
Joined: Feb 2001
It's not just mozilla, AOL are automatically including a pop-up killer with their package and many people actually pay for pop-up killer software now as they are just so sick of them. Personally I would rethink using pop-ups for gaining information.
Julia - if life was meant to be easy Michael Angelo would have painted the floor....
ronhollin posted this at 15:41 — 12th June 2003.
They have: 121 posts
Joined: Apr 2003
Ok, guys. I knew I was going to have to jump through hurdles to get some answers around here. Can I just please get some help.
Suzanne posted this at 16:36 — 12th June 2003.
She has: 5,507 posts
Joined: Feb 2000
Sweetie, I've already answered you. However:
1. develop a server-side poll processing script (or find one that's available as for use on a commercial site)
2. put it in its own page
3. use JavaScript to pop the window up when the user leaves the page
If you want to do it when people leave the site, I'm really not sure. I haven't bothered to learn how to do it because it's such a fundamentally bad idea. I would assume you'd have to set a cookie so they didn't get it on every page as they travel through the site or something.
necrotic posted this at 21:05 — 13th June 2003.
He has: 296 posts
Joined: May 2002
You'd have to use OnUnLoad(). Like so:
<body onunload="window.open(...)">
'Example (untested):
<html>
<head>
<title>New Document</title>
<script type="text/javascript">
<!--
function Exit() {
var page = "poll.php"; // Page to open
var name = "poll"; // Name of window
var h=600; //Height
var w=800; //Width
newWin=window.open(page, name, w,h",directories = no,location = no, menubar = no,resizable = no,scrollbars = no, status = no,toolbar = no,screenX = 0,screenY = 0,top = 0,left = 0");
newWin.focus();
return false;
}
-->
</head>
<body OnUnLoad="Exit();">
</body>
</html>
[James Logsdon]
The Webmistress posted this at 08:12 — 14th June 2003.
She has: 5,586 posts
Joined: Feb 2001
But surely that would have to be put onto every page, as you don't know what page people will leave from, and then you'd have the pop-up coming up everytime the page 'closed' when they clicked a link to another page?? Maybe you'd need to add some code to create a cookie so that it only opened once?
Julia - if life was meant to be easy Michael Angelo would have painted the floor....
Suzanne posted this at 20:29 — 14th June 2003.
She has: 5,507 posts
Joined: Feb 2000
Thanks for correcting my typo, too, lol...
Yes, you'd have to set some state or you'd be spamming the user endless with your pleading for them to answer the poll. Not exactly the way I'd want to leave a customer who may have been leaving my site with a favourable attitude until being attacked by the popup.
I really do think that, while it's possible to do it, it's better for your users AND for you to have the poll embedded into the website (on every page if you want) asking for the feedback. If you want the feedback, don't force them to give it to you or you're going to get a lot of nonsense feedback or worse, none at all.
For instance, the Washington Post makes you fill in a quiz every time you visit their site, for demographics. Every time I give them different information because it's a) totally invasive information that they are asking and b) a highly ineffective way for them to be asking and c) it makes me annoyed every time I view the screen.
So annoyed that I will consciously avoid links to their site now, so whatever news they are reporting, I'm not reading it and their value to me as a news source has plummeted.
TonyMontana posted this at 19:32 — 15th June 2003.
They have: 218 posts
Joined: Apr 2001
Pop-up blockers stop a lot of sites from working (including hotmail email accounts). People will have to learn to turn it on and off. I have Naviscope, and I toggle it on and off if I know a site has spam. Lots of people use mozilla.
Onunload popups are just annoying period. But other uses of javascript are very valid. Create a poll with a server side scripting, then display it in a new window if that's what you are looking for.
TonyMontana
electricmountain.com
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.