| |||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | #1 (permalink) |
| NamePros Regular | 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++; } } //--> </script> <body onunload="onul()"> http://www.javascript-page.com/onunload.html thanks a bunch!
__________________ Sincerely Mike Kelly |
| |
| | #2 (permalink) |
| NamePros Regular | Something like this? http://www.htmlite.com/JS018.php
__________________ :music: Kevin Tahoe Cabins Lake Tahoe Cabins Diabetes Recipes Image Uploader Photoshop Tricks Chests of Drawers |
| |
| | #3 (permalink) |
| NamePros Regular | 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 |
| |
![]() |
| 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 05:41 AM |
| my first webstie | robsonde | Web Design Reviews | 20 | 10-10-2004 01:47 AM |