GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Exit popup code needed (https://gfy.com/showthread.php?t=325401)

BradM 07-13-2004 08:09 AM

Exit popup code needed
 
Hey folks hoping you can give me a hand. Programmer here says it is impossible to do, and I am pretty sure he's wrong so let's embarrass him a bit ;)

I need some code that will launch an exit ONLY if the browser has been closed or the domain has been left. So they go to www.xxx.com and then go to www.www.com, they would get it.

I don't want it to launch if they go from the index page to another page on the site.

Anyone know of anything? I googled but nothing exactly like this.
Thanks! :thumbsup

{fusion} 07-13-2004 08:13 AM

do a sneeky popunder :)

jimmyf 07-13-2004 08:15 AM

I'd 2 have that code also, when they leave the domain...

DutchTeenCash 07-13-2004 08:16 AM

hahahahahahahaha LANGUAGE="hahahahahahahahahaha">
var goneaway;

function showPopup() {
if( goneaway ) {
NewWindow=windowhahahahahaha("http://www.yoursiteexitpopup.com"); }
}
</hahahahahahahaha


</head>
<body bgcolor="FFE9B8" topmargin="0" marginheight="0" hahahahahahahaha"goneaway=true" ONUNLOAD="showPopup();">


make sure you add the onclick false on every link you DONT want the exit to popup :

<a href="members/pictures.php" ONCLICK="goneaway=false;">

DutchTeenCash 07-13-2004 08:17 AM

that looks cool :) drop me a line to get the code ok bob AT thinkx DOT tv

BradM 07-13-2004 08:18 AM

Thanks Bob, emailing you now!

QualityMpegs 07-13-2004 08:19 AM

Your programmer said that's impossible?

Tom_PMs 07-13-2004 08:22 AM

That looks like a normal exit popup code. If I go from index to page 1 then back button, it'll pop even if I'm on the same domain.

Or, if that code is only on index, and I go to page 1 then close browser, it wont pop.

I dont think thats the answer you're looking for, but I may be just sleepy.

BradM 07-13-2004 08:22 AM

Quote:

Originally posted by QualityMpegs
Your programmer said that's impossible?
Hahaha. Tell me about it.

Jman 07-13-2004 08:25 AM

Quote:

Originally posted by BradM
Hahaha. Tell me about it.
He comes from and Island, I beleive he does not go out that much :Graucho

BradM 07-13-2004 08:44 AM

Bump. Thanks to Bob for the code but it's not exactly what I need. This one is a bit flawed... having to add the onclick to all links is not really an option.

I'm going to keep hunting too.

Tom_PMs 07-13-2004 08:53 AM

Just thinking out loud here.
If you want to pop a window when a browser is trying to *leave* a domain, you'd have to be examining the URI that is being requested, and before it's displayed.

That is, IF currently on mydomain AND IF new action will exit mydomain, THEN pop.

So you cant really examine the current state, you'd have to examine a future state when a link or button is clicked.

You could probably do a custom mod_rewrite script.
Use the rewriterule to pass the request_uri as a query_string to the script, then do an IF THEN ELSE type of thing..

There ya go, lol

BradM 07-13-2004 09:00 AM

lol Tom I haven't touched any sort of scripting in a long ass time. You ALMOST lost me.

The question is... do I feel like programming. ;)

Tom_PMs 07-13-2004 09:05 AM

Hmm actually I doubt that would cover it anyway, lol. Like I said just thinking out loud.

If you were to click a link off your domain, your htaccess wouldnt kick in anyway. Maybe you can use php or a cookie, I dunno.

PrivateIvy 07-13-2004 09:05 AM

In your header you put this:

hahahahahahahaha language="hahahahahahahahahaha">
<!--
var exit=true;
function xit()
{
if (exit)
open("http://www..com","copy");
}
//-->
</hahahahahahahaha

Then in the body tag put this:

onunload="xit()"

Then on every other link that you don't want to pop that window you add :

onclick="exit=false


Very simplified way to do this:

:thumbsup

Ivy

PrivateIvy 07-13-2004 09:07 AM

Quote:

Originally posted by BradM
Bump. Thanks to Bob for the code but it's not exactly what I need. This one is a bit flawed... having to add the onclick to all links is not really an option.

I'm going to keep hunting too.

sorry...didn't see that you didn't want to add that snippet to your other links....ok...back to the drawing board for you :winkwink:

Ivy

BradM 07-13-2004 09:26 AM

I spammed devshed. Maybe someone there will know

BradM 07-14-2004 08:28 AM

bumpppp

fuelcell 07-14-2004 09:02 AM

It's been awhile since I've had to do this but . . .

If memory serves, you can frame your site leaving a 1 pixel top frame which ensures that the popup code will not launch until they actually leave the site or close the browser.

Of course, far fewer people actually see popups anymore with all the blockers out there and Microsoft's update to IE is just around the corner.

Reak 07-14-2004 09:06 AM

:banana

macho 07-14-2004 09:06 AM

Check some java script tutorial something like that:
http://www.webteacher.com/hahahahaha...aha/index.html

BradM 07-14-2004 09:19 AM

Yeah the 1px frame isn't an option due to SEO. But that was the first thing I thought of. :)

fuelcell 07-14-2004 09:45 AM

Quote:

Originally posted by BradM
Yeah the 1px frame isn't an option due to SEO. But that was the first thing I thought of. :)
Then your programmer is right. :)

emthree 07-14-2004 11:00 AM

Quote:

Originally posted by BradM
having to add the onclick to all links is not really an option.

You're assed. :2 cents:

emthree 07-14-2004 11:02 AM

Quote:

Originally posted by BradM
Yeah the 1px frame isn't an option due to SEO. But that was the first thing I thought of. :)
You're assed 99%. :(

enigma 07-15-2004 04:52 AM

Uh.... just make your index page a frameset with a hidden frame and a 100% visible frame. Load your site in the 100% visible frame, load your popup code in the hidden frame, and there ya go. :)

Checkout http://www.valmalone.com/ for an example of how to do this.

I ICQed you in case you miss this reply...

Trax 07-15-2004 05:02 AM

fire your programmer
that code with onexit and co has been around since day 1 of the internet

Fizzgig 07-15-2004 05:17 AM

I have to ask...

Why is that not an option? As far as I know it's the only way...

But, why is it not an option?
If you have a ton of links to edit, you do an edit/replace and it's really easy (tedious, but easy).

enigma 07-15-2004 05:18 AM

Quote:

Originally posted by BradM
Yeah the 1px frame isn't an option due to SEO. But that was the first thing I thought of. :)
Okay, I'll admit it--I didn't read the whole thread before I replied either (like Ivy), lol. Why don't you just put all your SEO stuff on the index page, though? Just repeat everything you have on your current index page and put it between the <noframes></noframes> tags. Won't that work? I'm no SEO, but...


All times are GMT -7. The time now is 01:21 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123