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)
-   -   js popup that appears only when backing out of a page? (https://gfy.com/showthread.php?t=779047)

coolegg2 10-24-2007 06:51 AM

js popup that appears only when backing out of a page?
 
Sometimes I think google is not the SE it once was... having trouble finding something like this:

I need some javascript that will pop up a window only when the user uses the browser Back button, but not if they click a link on the page. In otherwords the scenario is

Page 1 > Page 2 > Sign-up Page

I want a popup to appear if the person backs out of Page 2 but not if they proceeed to the sign-up form.

Any suggestions?

munki 10-24-2007 06:53 AM

standard pop up code with validation variable on clicked urls

if user clicks <a> 1 the pop up is turned on

if user clicks <a> 2 the pop up is turned off...

simple enough

coolegg2 10-24-2007 07:10 AM

Thanks munki, but can you elaborate? I don't follow you exactly. An example page maybe?

If you are saying have the standard popup-on-exit code but somehow it gets disabled if they click on the link to the signup page, then that would work for me, but I have no idea what that js would look like.

munki 10-24-2007 07:12 AM

use a js if then else statement... and set the var from the a href call

coolegg2 10-24-2007 07:17 AM

Okay, thanks man. That points me in the right direction. I don't know js very well though, so I'll have to try to find an example/sample code.

sysk 10-24-2007 07:32 AM

Try AJAX for switching between pages until registration is completed and add a JS that will alert() or confirm() on exit.

pornguy 10-24-2007 07:44 AM

Guys. he is looking for the code. Anyone that has it please share.

If I had it, I would post it for you.
If I find it today I will.

coolegg2 10-24-2007 01:58 PM

Quote:

Originally Posted by pornguy (Post 13280332)
Guys. he is looking for the code. Anyone that has it please share.

If I had it, I would post it for you.
If I find it today I will.

Thanks man.

And if anyone else has it handy that would be great!


All times are GMT -7. The time now is 06:18 AM.

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