Go Back   WarriorForum - Internet Marketing Forums > Warrior Support Forums > Website Design
Register Blogs FAQ Social Groups CalendarHelp Desk

Reply
 
LinkBack Thread Tools
Old 08-02-2009, 01:02 AM   #1
Active Warrior
 
Join Date: Jul 2008
Location: Portland, OR
Posts: 51
Thanks: 2
Thanked 0 Times in 0 Posts
Default How to redirect a Visitor only when they Exit Your Webpage??

Hello,

Anybody know how to redirect a visitor when they exit your homepage?

Let me explain more..

When someone visits my presell landing page and looks around and instead of proceeding onto one of my links to the merchants website they close the window and exit out of my site...

How do I redirect them the moment they close my website to the merchants website?

Also I wouldn't want this to interfere with any other outward links on my website..

Does this make sense to anyone, does anyone know how I can do this?

THANK YOU!
Phil The Marketer is offline   Reply With Quote
Old 08-02-2009, 02:03 AM   #2
Freelance Web Developer
 
Join Date: Jul 2009
Location: Corpus Christi, TX
Posts: 114
Blog Entries: 3
Thanks: 8
Thanked 12 Times in 10 Posts
Social Networking View Member's Myspace Profile  View Member's FaceBook Profile  View Member's Twitter Profile  View Member's YouTube Profile
Contact Info
Send a message via AIM to waloosh Send a message via MSN to waloosh Send a message via Yahoo to waloosh Send a message via Skype™ to waloosh
Default Re: How to redirect a Visitor only when they Exit Your Webpage??

Here, try this.
If you already have an external javascript page (javascript.js), then add this:

Quote:
window.onbeforeunload = function () {
window.location = 'http://www.waloosh.com';
return false;
}
Otherwise, edit your index page and place this in your header, not body.

Quote:
<script language=javascript>
window.onbeforeunload = function () {
window.location = 'http://www.waloosh.com';
return false;
}
</script>
If you did it correctly, then it will automatically redirect to the page you link it to, and have a message that asks if you'd like to "Navigate away from the current page" with a Yes or No option.

Hope this helps!

If you need further assistance, don't hesitate to ask.

My Web Development and Internet Marketing Community:
Waloosh.com
waloosh is offline   Reply With Quote
Old 08-02-2009, 02:30 AM   #3
Active Warrior
 
Join Date: Jul 2008
Location: Portland, OR
Posts: 51
Thanks: 2
Thanked 0 Times in 0 Posts
Default Re: How to redirect a Visitor only when they Exit Your Webpage??

Looks like this works!!!

I gave it a try, but haven't tested to see what happens when I click an outward link in my webpage..

I will test..Thank you!
Phil The Marketer is offline   Reply With Quote
Old 08-02-2009, 02:32 AM   #4
Freelance Web Developer
 
Join Date: Jul 2009
Location: Corpus Christi, TX
Posts: 114
Blog Entries: 3
Thanks: 8
Thanked 12 Times in 10 Posts
Social Networking View Member's Myspace Profile  View Member's FaceBook Profile  View Member's Twitter Profile  View Member's YouTube Profile
Contact Info
Send a message via AIM to waloosh Send a message via MSN to waloosh Send a message via Yahoo to waloosh Send a message via Skype™ to waloosh
Default Re: How to redirect a Visitor only when they Exit Your Webpage??

Hmm, I just retested this... unfortunately, this will conflict with your site's links. Every time you click on any link, it will popup and ask.

I'll try to see if I have anything else in my arsenal.

EDIT: Oh wait, that's because the link I tested was actually external, lol. I tested again with a link to a page within the same directory of my index, and it works perfect!

My Web Development and Internet Marketing Community:
Waloosh.com
waloosh is offline   Reply With Quote
Old 08-02-2009, 02:33 AM   #5
Active Warrior
 
Join Date: Jul 2008
Location: Portland, OR
Posts: 51
Thanks: 2
Thanked 0 Times in 0 Posts
Default Re: How to redirect a Visitor only when they Exit Your Webpage??

Darn...I just gave it a try and when i click on any link it brings the pop up window up....

I just wanted it set so it only redirects when someone closes my website out...

Any suggestions Waloosh?
Phil The Marketer is offline   Reply With Quote
Old 08-02-2009, 02:37 AM   #6
Freelance Web Developer
 
Join Date: Jul 2009
Location: Corpus Christi, TX
Posts: 114
Blog Entries: 3
Thanks: 8
Thanked 12 Times in 10 Posts
Social Networking View Member's Myspace Profile  View Member's FaceBook Profile  View Member's Twitter Profile  View Member's YouTube Profile
Contact Info
Send a message via AIM to waloosh Send a message via MSN to waloosh Send a message via Yahoo to waloosh Send a message via Skype™ to waloosh
Default Re: How to redirect a Visitor only when they Exit Your Webpage??

How do you have your page links coded? Are they full URLs or just "/page.html" or "page.html" ?


If they're full URLs, this script will think of them as external pages and will give you the redirect and warning. If they're just "page.html" or "/page.html" then they're considered internal pages and wont give you the warning nor redirect anywhere.

My Web Development and Internet Marketing Community:
Waloosh.com
waloosh is offline   Reply With Quote
Old 08-02-2009, 02:42 AM   #7
Active Warrior
 
Join Date: Jul 2008
Location: Portland, OR
Posts: 51
Thanks: 2
Thanked 0 Times in 0 Posts
Default Re: How to redirect a Visitor only when they Exit Your Webpage??

It is a single page salesletter...the outbound links on my page are full http://www..etc...
Phil The Marketer is offline   Reply With Quote
Old 08-02-2009, 05:19 AM   #8
Active Warrior
 
Join Date: Jul 2008
Location: Portland, OR
Posts: 51
Thanks: 2
Thanked 0 Times in 0 Posts
Default Re: How to redirect a Visitor only when they Exit Your Webpage??

Dude Waloosh you are the man! Thanks for helping me get that up and running, you sure do know your stuff I couldn't of done it without your help man!!! Sweet!
Phil The Marketer is offline   Reply With Quote
Old 08-02-2009, 05:27 AM   #9
Freelance Web Developer
 
Join Date: Jul 2009
Location: Corpus Christi, TX
Posts: 114
Blog Entries: 3
Thanks: 8
Thanked 12 Times in 10 Posts
Social Networking View Member's Myspace Profile  View Member's FaceBook Profile  View Member's Twitter Profile  View Member's YouTube Profile
Contact Info
Send a message via AIM to waloosh Send a message via MSN to waloosh Send a message via Yahoo to waloosh Send a message via Skype™ to waloosh
Default Re: How to redirect a Visitor only when they Exit Your Webpage??

Anytime =D was a pleasure working with you.

My Web Development and Internet Marketing Community:
Waloosh.com
waloosh is offline   Reply With Quote
Old 08-05-2009, 03:19 PM   #10
HyperActive Warrior
War Room Member
 
Sid Kaplan's Avatar
 
Join Date: Nov 2007
Location: California
Posts: 397
Thanks: 71
Thanked 41 Times in 22 Posts
Social Networking View Member's Twitter Profile 
Contact Info
Send a message via Skype™ to Sid Kaplan
Default Re: How to redirect a Visitor only when they Exit Your Webpage??

Just passing through and saw this as a great example of members helping members. Great work waloosh!

Sid Kaplan is offline   Reply With Quote
Old 08-05-2009, 06:50 PM   #11
A rat after money...
War Room Member
 
HomeBizNizz's Avatar
 
Join Date: Jul 2009
Location: Inside a cheese...
Posts: 598
Thanks: 363
Thanked 54 Times in 47 Posts
Default Re: How to redirect a Visitor only when they Exit Your Webpage??

Gets me thinking about porn pages...

HomeBizNizz is offline   Reply With Quote
Old 08-05-2009, 10:13 PM   #12
Old Fa*t Warrior
 
Harrier's Avatar
 
Join Date: Jul 2009
Location: Central Coast of California
Posts: 48
Thanks: 5
Thanked 3 Times in 3 Posts
Default Re: How to redirect a Visitor only when they Exit Your Webpage??

Ya Know?.... This is one of my pet peaves.
When I am done with a site and click to exit... that is exactly what I want to do and
to be redirected by them really gets me annoyed.
But it is a sure way to make sure that I do not visit their site again.


Harrier is offline   Reply With Quote
Old 08-06-2009, 01:24 PM   #13
Advanced Warrior
War Room Member
 
Join Date: Jul 2009
Location: Ireland
Posts: 602
Thanks: 30
Thanked 66 Times in 55 Posts
Default Re: How to redirect a Visitor only when they Exit Your Webpage??

Hi,


Try using Dave Guindon's Exitsplash.com

That will do the trick!

E-supreme is offline   Reply With Quote
Old 08-06-2009, 02:59 PM   #14
Active Warrior
 
Join Date: Jun 2009
Location: Long Island, NY
Posts: 50
Thanks: 7
Thanked 2 Times in 2 Posts
Default Re: How to redirect a Visitor only when they Exit Your Webpage??

I also hate to be redirected. Brings back nightmares of long ago days when I couldn't do anything I actually wanted to do on the net because of such things.

Less annoying would be a popup that tries to entice me to stay when it detects my mouse coming close to the exit button.

An automatic redirect like the one you speak of would have me running a virus check on my computer to be safe, and I also would make a note not to go back to your site.

Sorry for the brutal honesty.

Just my 2 cents worth of my opinion.

ny_mariposa is offline   Reply With Quote
Old 08-08-2009, 09:02 AM   #15
HyperActive Warrior
 
kendrickyi's Avatar
 
Join Date: Aug 2009
Location: Singapore
Posts: 226
Thanks: 18
Thanked 10 Times in 9 Posts
Social Networking View Member's Twitter Profile 
Default Re: How to redirect a Visitor only when they Exit Your Webpage??

yes I kinda agree that redirecting a user would be quite annoying.
perhaps a less annoying tactic would be to simply put a window.prompt,
prompting the user if he/she really wants to exit.
I see that a lot.
kendrickyi is offline   Reply With Quote
Old 08-08-2009, 12:22 PM   #16
Warrior Mania
 
johnjimat's Avatar
 
Join Date: Apr 2009
Posts: 92
Thanks: 15
Thanked 8 Times in 8 Posts
Social Networking View Member's Myspace Profile  View Member's FaceBook Profile  View Member's Twitter Profile  View Member's YouTube Profile
Default Re: How to redirect a Visitor only when they Exit Your Webpage??

well the script is just for single page only. thanks for the script. i have use it for my single website page
johnjimat is offline   Reply With Quote
Old 09-11-2009, 09:51 AM   #17
Senior Warrior Member
War Room Member
 
Anonymous Affiliate's Avatar
 
Join Date: May 2009
Posts: 1,887
Thanks: 256
Thanked 336 Times in 245 Posts
Default Re: How to redirect a Visitor only when they Exit Your Webpage??

Two questions:

1) How would you use this with an Aweber form since it's an external page and it triggers the redirect when people opt-in

2) How can you modify the pop up text message?

TIA!
Anonymous Affiliate is offline   Reply With Quote
Old 09-11-2009, 10:16 AM   #18
Chick Magnet
 
BurgerBoy's Avatar
 
Join Date: May 2009
Location: Kentucky, USA
Posts: 193
Thanks: 18
Thanked 22 Times in 19 Posts
Default Re: How to redirect a Visitor only when they Exit Your Webpage??

Quote:
Originally Posted by Harrier View Post
Ya Know?.... This is one of my pet peaves.
When I am done with a site and click to exit... that is exactly what I want to do and
to be redirected by them really gets me annoyed.
But it is a sure way to make sure that I do not visit their site again.
I agree with you 100%. I will never go back to a site that has any pop-ups of any kind again.

BurgerBoy is offline   Reply With Quote
Old 08-15-2010, 06:27 PM   #19
Ethical Warrior
 
OmarMartin's Avatar
 
Join Date: Aug 2008
Location: Palm Bay Florida USA
Posts: 19
Thanks: 5
Thanked 14 Times in 7 Posts
Social Networking View Member's FaceBook Profile  View Member's Twitter Profile  View Member's YouTube Profile
Contact Info
Send a message via Skype™ to OmarMartin
Default Re: How to redirect a Visitor only when they Exit Your Webpage??

He said this is for a SALES page...

If the person is clicking the X to leave
then you should in fact hit them with an
exit splash or redirect.

Its common sense... simple math. A certain
percentage of those that leave will end
up buying.

It just makes business sense to do this.

Those of you that don't do this because
you don't want to "disturb" people that
are LEAVING your sales pages.... well..

YOU are leaving thousands of dollars
on the table.

Omar
OmarMartin is offline   Reply With Quote
Old 09-20-2010, 04:10 PM   #20
Warrior Member
 
Join Date: Sep 2010
Posts: 15
Thanks: 0
Thanked 1 Time in 1 Post
Default Re: How to redirect a Visitor only when they Exit Your Webpage??

Hi Waloosh,
I just came across a post you had going with someone about a year ago regarding exit pop ups and I was hoping to solicit a bit of help from you. I am trying to configure Exit Splash on my site but am having issues with the pop up appearing when any link is pressed...when all i want is it to appear if they press the back button or try to exit the site. You mentioned something about the urls...which I didn't really follow. Hopefully you are still around on the forum and able to help me with this....I am at the point of pulling my hair out.
Thanx
Jen
imajen is offline   Reply With Quote
Old 09-22-2010, 12:52 AM   #21
Warrior Member
 
CASimmons's Avatar
 
Join Date: May 2008
Location: Philadelphia, PA, USA.
Posts: 28
Thanks: 4
Thanked 6 Times in 5 Posts
Social Networking View Member's FaceBook Profile  View Member's Twitter Profile  View Member's YouTube Profile
Default Re: How to redirect a Visitor only when they Exit Your Webpage??

Quote:
Originally Posted by imajen View Post
Hi Waloosh,
I just came across a post you had going with someone about a year ago regarding exit pop ups and I was hoping to solicit a bit of help from you. I am trying to configure Exit Splash on my site but am having issues with the pop up appearing when any link is pressed...when all i want is it to appear if they press the back button or try to exit the site. You mentioned something about the urls...which I didn't really follow. Hopefully you are still around on the forum and able to help me with this....I am at the point of pulling my hair out.
Thanx
Jen
What he was saying was that any links configured like http:// www.somesite .net (considered external) will cause the popup while links configured like /filename.html or php will be considered internal and will not prompt the popup

So what you want to do is shortcode all your internal links.

Learn How to Get Unlimited Traffic from the World's Leading Sites

-------------------------------------------------------------------------------------

An Entrepreneur's Life: Learn It. Do It. Teach It. - www.CircleOneConnect.com

Last edited by CASimmons; 09-22-2010 at 12:55 AM. Reason: remove parsed link
CASimmons is offline   Reply With Quote
Old 09-22-2010, 01:02 AM   #22
HyperActive Warrior
 
Join Date: Jan 2010
Posts: 125
Thanks: 18
Thanked 4 Times in 3 Posts
Default Re: How to redirect a Visitor only when they Exit Your Webpage??

this is a very interesting article.thank you very much
downloadvyp is offline   Reply With Quote
Old 09-23-2010, 10:48 AM   #23
Vexb.com
War Room Member
 
Join Date: Jan 2010
Location: USA
Posts: 259
Thanks: 192
Thanked 28 Times in 25 Posts
Default Re: How to redirect a Visitor only when they Exit Your Webpage??

I tried this forever and had so many frustrating moments. So I just straight up bought a plugin and it works like a champ. Forget all the crap coding that never works right, or some parts work and some don't. I just bought Action PopUp: Attention-Grabbing Unblockable PopUps When Your Visitors Leave the Page... saves you lots of time and headaches my friends.

tbjason is offline   Reply With Quote
Old 09-24-2010, 08:25 PM   #24
Banned
War Room Member
 
Join Date: Sep 2010
Posts: 43
Thanks: 1
Thanked 0 Times in 0 Posts
Default Re: How to redirect a Visitor only when they Exit Your Webpage??

beautiful degisn, useful content will be better for the visitors.
pr678com is offline   Reply With Quote
Old 10-01-2010, 10:45 PM   #25
Warrior Member
 
Join Date: Oct 2010
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default Re: How to redirect a Visitor only when they Exit Your Webpage??

The script that you have provides is useful for people who are having a small website with only one, is there something for larger website?

jakeseth12 is offline   Reply With Quote
Old 10-04-2011, 04:05 PM   #26
HyperActive Warrior
War Room Member
 
derekmichael02's Avatar
 
Join Date: Nov 2009
Posts: 137
Thanks: 29
Thanked 17 Times in 16 Posts
Default Re: How to redirect a Visitor only when they Exit Your Webpage??

Mike Dillard maintains that this DOUBLED his sales. He did $4 Mil last year. See it in action of pro: http://www.magneticsponsoring.com/msletter

It's pretty awesome how he does it.

derekmichael02 is offline   Reply With Quote
Old 10-05-2011, 07:20 AM   #27
Warrior Member
 
raxe's Avatar
 
Join Date: Sep 2011
Posts: 15
Thanks: 0
Thanked 1 Time in 1 Post
Default Re: How to redirect a Visitor only when they Exit Your Webpage??

I must agree that this kind of redirect is pretty annoying for users, who probably would never return to this website again. There are better ways of keeping your customers on your site.

Raxe Project - Professional advertising services. We believe quality can be made affordable!
Website Development & SEO - Graphic Design - Marketing Services - Events Organisation

Visit our blog for free Search Engine Optimisation Guides
raxe is offline   Reply With Quote
Old 11-18-2011, 12:05 AM   #28
Warrior Member
 
Join Date: Feb 2008
Location: Spain
Posts: 25
Thanks: 65
Thanked 17 Times in 16 Posts
Social Networking View Member's FaceBook Profile  View Member's Twitter Profile  View Member's YouTube Profile
Default Re: How to redirect a Visitor only when they Exit Your Webpage??

Quote:
Originally Posted by kendrickyi View Post
yes I kinda agree that redirecting a user would be quite annoying.
perhaps a less annoying tactic would be to simply put a window.prompt,
prompting the user if he/she really wants to exit.
I see that a lot.
Whenever I get a popup asking that question I ALWAYS click on Exit. It would be interesting to have some stats about the usefulness of it. Anyhow, I don't like. There are much better ways to skin this cat.

unoentremil is offline   Reply With Quote
Old 02-07-2012, 01:23 AM   #29
Warrior Member
 
korker's Avatar
 
Join Date: Mar 2011
Posts: 25
Thanks: 5
Thanked 14 Times in 13 Posts
Default Re: How to redirect a Visitor only when they Exit Your Webpage??

Quote:
Originally Posted by waloosh View Post
Here, try this.
If you already have an external javascript page (javascript.js), then add this:

Otherwise, edit your index page and place this in your header, not body.

If you did it correctly, then it will automatically redirect to the page you link it to, and have a message that asks if you'd like to "Navigate away from the current page" with a Yes or No option.

Hope this helps!

If you need further assistance, don't hesitate to ask.
Hey Waloosh -

Thanks for this awesome script. I'm using it in one of my wordpress sites. It works great so long as I have my links open in a 'separate window'. My only major issue is that on my page navigation.. Home, Contact us, About Us ect... when any of those are clicked the redirect kicks in immediately.

Any clever way to get around that?

korker is offline   Reply With Quote
Old 02-07-2012, 04:17 PM   #30
Active Warrior
War Room Member
 
Join Date: Jan 2011
Posts: 87
Thanks: 0
Thanked 5 Times in 5 Posts
Default Re: How to redirect a Visitor only when they Exit Your Webpage??

My first idea was to create a javascript popup(type) message that appears upon your visitor trying to leave. When this accorus, you could pretty easily write the code to open a new tab or window with the website you want to redirect them to. Just go to a coding forum and ask how to create a message similar to those "are you sure you want to leave this page" messages. And once that happens, it should trigger a new window or tab to open with the site of your choice.
nightshade877 is offline   Reply With Quote
Old 02-07-2012, 04:54 PM   #31
Deborah Richardson
 
Azarna's Avatar
 
Join Date: Sep 2011
Location: Middle of England
Posts: 327
Thanks: 85
Thanked 75 Times in 64 Posts
Default Re: How to redirect a Visitor only when they Exit Your Webpage??

Why on earth would you want to force a visitor somewhere other than where they want to go? Isn't that really rude?
Azarna is offline   Reply With Quote
Reply

  WarriorForum - Internet Marketing Forums > Warrior Support Forums > Website Design

Tags
exit, redirect, visitor, webpage

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -6. The time now is 01:55 AM.