Now Leaving, Web Page |
||
Welcome to the Zymic webmaster forums. Our forums are here to provide people the free ability to discuss a range of websites related topics such as design, development coding and marketing.
In order to post you will need to register for a zymic account or if you already have one simply login by using the form on the left.
Zymic Webmaster Forums Web Design & Development Client Side Scripting JavaScript |
||
![]() |
Now Leaving, Web Page |
||
Sep 16 2010, 10:30 PM
Post
#1
|
|
|
Newbie ![]() Group: Members Posts: 1 Joined: 21-July 10 Member No.: 149,953 |
How do you make a " You Are Not Leaving _____ " page ????
|
|
|
Sep 18 2010, 03:33 AM
Post
#2
|
|
|
Outrageously Uber Ninja ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 840 Joined: 30-March 08 From: Cincinnati, OH Member No.: 16,073 |
How do you make a " You Are Not Leaving _____ " page ???? Welcome to the forums DjLowse, next time please make sure you post your topic in the right thread. I'm not sure exactly what you are trying to do maybe you could link us to an example? Best Regards, Kevin DiGennaro |
|
|
Sep 18 2010, 06:53 PM
Post
#3
|
|
![]() Outrageously Uber Ninja ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Moderators Posts: 1,562 Joined: 19-September 07 From: Rochester, NY Member No.: 86 |
Let me see if I know what your talking about. You want to show a message that possibly pops up in a light box or message box stating you are leaving my site when they click on an external link (link not on your site/server)? If so, you can find something similar to what your looking for here: http://www.w3schools.com/js/js_whereto.asp
|
|
|
Jun 3 2011, 07:55 PM
Post
#4
|
|
|
Member ![]() ![]() Group: Members Posts: 47 Joined: 15-March 11 Member No.: 182,002 |
Do you mean this: --?
CODE <script type="text/javascript"> window.onbeforeunload=youAreNowLeaving; function youAreNowLeaving() { return ("You are now leaving this page..."); } </script> When you leave the page, the dialog box picture that I attached will show up (assuming you have windows 7)... Or do you mean a page that you can't close? Doing the second thing is impossible, but you could try: CODE window.onbeforeunload=youAreNOTLeaving; function youAreNOTLeaving() { window.open(window.location.href); } Whenever you try to close the window, the same page pops up..... I DO NOT reccomend doing this because it will annoy
Attached File(s)
|
|
|
![]() |
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users) |
||
| 0 Members: | ||
Forum Jump |
||
| Lo-Fi Version | Time is now: 24th May 2013 - 04:25 AM |