Zymic Forums

Webmaster resources

Zymic IRC Server

Chat in real time at irc.zymic.com - Learn More

Welcome

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.

left Zymic Webmaster ForumsWeb Design & DevelopmentClient Side ScriptingJavaScript right
  Closed Topic Start new topic
left right
DjLowse
post 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 ???? blink.gif
Go to the top of the page 
 
  + Quote Post
k.digennaro
post 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



QUOTE(DjLowse @ Sep 16 2010, 10:30 PM) *
How do you make a " You Are Not Leaving _____ " page ???? blink.gif


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
Go to the top of the page 
 
  + Quote Post
IamShipon1988
post 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
Go to the top of the page 
 
  + Quote Post
EvilMastermindsP...
post 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 dry.gif dry.gif your users......
Attached File(s)
Attached File  leaving.jpg ( 31.34k ) Number of downloads: 100
 
Go to the top of the page 
 
  + Quote Post
 Closed Topic Start new topic
left right
0 Members:
left right
 


Lo-Fi Version Time is now: 21st May 2013 - 06:33 PM