There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
access audio avg avg 8 bios blue screen boot bsod computer connection cpu crash css dell desktop dma driver drivers dvd email error excel explorer firefox firefox 3 freeze gimp graphics hard drive hardware hijackthis hjt install internet internet explorer itunes keyboard laptop macro malware monitor motherboard network networking outlook outlook 2003 outlook 2007 outlook express pio problem problems router seo server slow sound sp3 spyware trojan usb video virtumonde virus vista vundo windows windows vista windows xp winxp wireless
Web Design & Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Internet & Networking > Web Design & Development >
"Do you really want to leave this site" <---- how to create something to do this?


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

 
Thread Tools
BonniC's Avatar
Junior Member with 1 posts.
 
Join Date: Jul 2008
Location: The Jersey Shore
Experience: Advanced
17-Jul-2008, 12:28 PM #1
Question "Do you really want to leave this site" <---- how to create something to do this?
I have a client who is requesting a "pop-up" using a program (he suggested freeware... sigh...) or a script or even programming to create something that would do the following...

A person visits his site www.anysite.com.
They leave the home page shortly after landing.
As they go to leave the site, a message (pop-up? script?) would appear with a message (something like "did you find the information you needed" or something similar that can be customized.)

In addition to that, he would like:
1) the "pop-up to appear on any page that the visitor leaves
2) possibly having each page having a customized message
3) and being able to apply this message to specifics such as the length of time on the site and/or page,
4) as well as the distance of the visitor from the office (ie 250 miles)

I have only seen "pop-ups" asking me if I was sure I wanted to leave the site. But my pop-up blocker usually blocks stuff like that.

I personally have NO idea what kind of program, script, or programming language could/would be used to do this. I know he wants something free (yea, right!), but I would not even know where to start.

Can anyone help me with this? Or direct me to a site, program, etc to give me some ideas? If programming is needed, what would be used?

For the record, his website is strictly HTML (with some javascript)... it is nothing fancy... just a LOT of pages with text and pics.

I appreciate anyone's help and/or guidance!!

Bonni


madd74's Avatar
Computer Specs
Senior Member with 206 posts.
 
Join Date: Nov 2003
Location: Des Moines, IA
Experience: Advanced
17-Jul-2008, 02:14 PM #2
http://www.htmlgoodies.com/primers/j...le.php/3478221

The problem with using a script like this is that people such as myself that block all pages javascript until I trust a page, it is not ever going to be triggered (unless I add the site in question).

Pretty much, you could use an alert also:

http://www.faqs.org/docs/htmltut/doc..._onUnload.html

Just remember, in doing what he wants to do, he could end up annoying a LOT of people who visit. I know if I had something like that on my forums, each time someone click a link to post, read, move to another forum, etc, that an alert box would pop up each and every time.
__________________
madd says check out Madd's World - Red Mage of the Net (madd74.com) or chat with me and friends live! or visit madd on myspace
namenotfound's Avatar
Computer Specs
Distinguished Member with 2,082 posts.
 
Join Date: Apr 2005
Location: New York
Experience: I know what I know, I am
18-Jul-2008, 12:22 AM #3
I agree with madd that it would annoy a lot of people. I for one, would just leave the site and never return if I got a pop-up every single time I left the page to go to another page on the site.
TheRobatron's Avatar
Computer Specs
Senior Member with 415 posts.
 
Join Date: Oct 2007
Location: England
Experience: Intermediate
18-Jul-2008, 11:20 AM #4
Some sites use a server-side redirection page, where instead of linking to an external site they link to a local file, sending the external URL, such as redirect.php?url=www.google.com. Then redirect.php can say "Are you sure you want to leave? etc" and there is usually a direct link to that site saying "Proceed" or a timed Javascript redirection.

This involves more work as you have to change every external link (or write a script to do that for you) but it's garaunteed to work. Also I do agree that popups are very annoying and you'd be better off just using target="_blank" for external links, so the original site remains open.
__________________
Gone on holiday, be back on 29th

There's no place like 127.0.0.1

namenotfound's Avatar
Computer Specs
Distinguished Member with 2,082 posts.
 
Join Date: Apr 2005
Location: New York
Experience: I know what I know, I am
18-Jul-2008, 04:38 PM #5
Quote:
Originally Posted by TheRobatron View Post
Some sites use a server-side redirection page, where instead of linking to an external site they link to a local file, sending the external URL, such as redirect.php?url=www.google.com. Then redirect.php can say "Are you sure you want to leave? etc" and there is usually a direct link to that site saying "Proceed" or a timed Javascript redirection.

This involves more work as you have to change every external link (or write a script to do that for you) but it's garaunteed to work. Also I do agree that popups are very annoying and you'd be better off just using target="_blank" for external links, so the original site remains open.
Those link have the risk of giving your site a bad name though. Like let's say you owned goodsite.com and someone used your redirecting file to link to a bad site, such as goodsite.com/redirect.php?url=badsite.com

People will think it's your site giving them the virus or whatever there is on "badsite.com"
__________________
-----------------------------
| 404: Name Not Found |
-----------------------------
PLEASE NOTE: If I happen to help you in a post, or just simply reply to it, doesn't mean I want to be bombarded with PMs. I answer all questions in posts, not in PMs. Thank you, and have a good day.

<?php $h = 'Hello '; $w = 'World'; echo $h.$w; ?>

My Favorite Editors:
Windows: Crimson Editor
Mac: Taco HTML Edit
Linux: gPHPEdit
TheRobatron's Avatar
Computer Specs
Senior Member with 415 posts.
 
Join Date: Oct 2007
Location: England
Experience: Intermediate
18-Jul-2008, 06:15 PM #6
Quote:
Originally Posted by namenotfound View Post
People will think it's your site giving them the virus or whatever there is on "badsite.com"
That's why most of these pages have disclaimers on them and make it clear that the user is leaving the site - the purpose of them is to avoid your site getting a bad name
madd74's Avatar
Computer Specs
Senior Member with 206 posts.
 
Join Date: Nov 2003
Location: Des Moines, IA
Experience: Advanced
18-Jul-2008, 08:30 PM #7
i see what namenotfound is saying, and think the only way to get around that is you would have to predefine what links could end up getting redirected in the script that way someone else could not use just any site to redirect it.

One thing that may NOT be so annoying, only a little, is if you used a script that relied on cookies so that once you click on a link, it gives you the message that you are going to be redirected to an external link, and then it remembers your selection so any time you click on that same link as long as you have cookies set you do not get the popup every time.

This problem, however, lies in people who do not accept your cookie, or who clean up their cookies often
__________________
madd says check out Madd's World - Red Mage of the Net (madd74.com) or chat with me and friends live! or visit madd on myspace

Last edited by madd74 : 18-Jul-2008 08:33 PM. Reason: I had more to say :)
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 On
Pingbacks are Off
Refbacks are Off

You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 08:40 PM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.