Javascript Navigation

C

Chris Kennedy

I have seen a feature on a site that I think is pretty cool. When the
user leave the site a pop up appears asking would they like more
information. I might be missing something but the first way I thought
of doing this would be to find out where the user is going to and if
it not within the site domain then display the popup. Is there a
javascript property which on leaving the page tells you where it is
going to? Or am I barking up the wrong tree?? Regards, Chris.
 
L

Lasse Reichstein Nielsen

I have seen a feature on a site that I think is pretty cool. When the
user leave the site a pop up appears asking would they like more
information.

Trust me when I say that there are plenty of people out there, who
would use less civil words than "cool" about unwanted popups.... to
the extend that they install software (or use browsers) that prevents
such popups from even appearing. I am one of those.
I might be missing something but the first way I thought
of doing this would be to find out where the user is going to and if
it not within the site domain then display the popup. Is there a
javascript property which on leaving the page tells you where it is
going to?

There isn't.

What you can do, it to put the effect on all links (that you make)
that leave the site. This can be automated.

Another solution is to add the effect to the onunload handler, and
make every link into your site disable the effect. The advantage
is that it works if people leave your site in another way than
clicking on one of your links. The disadvantage is that many people
disable this solution completely.
Or am I barking up the wrong tree??

I would say: Totally. Don't pop up windows without explicit consent
from the user, or risk the users leaving your site for good. Not all
of them, but definitly some.

/L
 
O

orlando echevarria

You are not barking up the wrong tree BUT unreqrequested Pop-ups are
very annoying and I turn them off by default unless I click on the link
to give me that pop-up.

Rest assured, while you may think it is "cool" your users may not.
Trust me when I say this, users hate clutter and they want control over
their browsing experience not the site operator who thinks something
maybe "cool."

As you can tell, I despise pop-ups because of their instrusive nature.
If I want a pop-up, I'll click on it or if I am interested, I'll email
you or fill out your form information request form.
 
R

rf

Chris Kennedy said:
I have seen a feature on a site that I think is pretty cool. When the
user leave the site a pop up appears asking would they like more
information. I might be missing something but the first way I thought
of doing this would be to find out where the user is going to and if
it not within the site domain then display the popup. Is there a
javascript property which on leaving the page tells you where it is
going to? Or am I barking up the wrong tree?? Regards, Chris.

You are in a shoe shop. You don't like any of the shoes, not your style. You
walk out the door. A salesperson runs out after you, stands in front of you
and says "Would you like some more information on our shoes sir?".

What do you do?

Cheers
Richard.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,090
Messages
2,570,603
Members
47,223
Latest member
smithjens316

Latest Threads

Top