NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page entering timer

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 06-24-2005, 01:36 AM THREAD STARTER               #1 (permalink)
NamePros Regular
Join Date: Feb 2004
Posts: 650
teclance is on a distinguished road
 



entering timer


Hi guys,

I run an autosurf system and one of the biggest problems when users surf is frame breakers. So I have inserted a small java code that will cause a window to pop up everytime the window is either refreshed, another link is clicked or a site has a frame breaker.

The window that pops up asks the user if they would like to leave the site and if they click yes it will take them to the page they clicked etc... if they click no it will take them back to the page.

Some times my users turn the surfing window on and leave the computer for a while so if a frame breaker occurs they won't be there to click "no" when the window pops up.

So I was hoping that I could put a timer into the java snippet and if there is no response within 30 seconds it would take the user back to the surfing window.

Here is the java code I use and you can try it on your site if you like.

<script language="Javascript">
<!--
// please keep these lines on when you copy the source
// made by: Nicolas - http://www.javascript-page.com

var your_message = "Do you really want to leave this page?";
var times = 0;

function onul() {
if (times == 0) {
var leave = confirm(your_message);
if (!leave) location = self.location;
times++;
????: NamePros.com http://www.namepros.com/programming/101382-entering-timer.html
}
}

//-->
</script>
<body onunload="onul()">

http://www.javascript-page.com/onunload.html


thanks a bunch!
__________________
Sincerely
Mike Kelly
teclance is offline  
Old 06-24-2005, 02:12 AM   #2 (permalink)
NamePros Regular
 
Fork's Avatar
Join Date: May 2005
Location: California
Posts: 607
Fork has much to be proud ofFork has much to be proud ofFork has much to be proud ofFork has much to be proud ofFork has much to be proud ofFork has much to be proud ofFork has much to be proud ofFork has much to be proud of
 


Protect Our Planet Save a Life
Something like this?
http://www.htmlite.com/JS018.php
__________________
Kevin I.
Fork is offline  
Old 06-24-2005, 02:17 AM THREAD STARTER               #3 (permalink)
NamePros Regular
Join Date: Feb 2004
Posts: 650
teclance is on a distinguished road
 



hi,

Thank you for that! It looks very close to what I need. Now I got to try and implement that into the above java snippet to close the pop up window and have the surfing window to continue.

Any one know how to do that
__________________
Sincerely
Mike Kelly
teclance is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Anyone care to give me some feedback on my site JTerry00 Web Design Reviews 13 06-04-2005 06:41 AM
my first webstie robsonde Web Design Reviews 20 10-10-2004 02:47 AM
First timer on NP with names for sale dcmginc Domains For Sale - Make Offer 2 04-19-2004 08:47 PM

Liquid Web Smart Servers  
All times are GMT -7. The time now is 11:01 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger