Client Side Things
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesClient Side Things

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old July 20th, 2004, 04:59 AM
SnowStorm SnowStorm is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 374 SnowStorm User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Javascript Timer

Ok I have this javascript timer,
php Code:
Original - php Code
  1.  
  2. <SCRIPT LANGUAGE="Javascript"><!--
  3.     var x = 120
  4.     var y = 1
  5.     function startClock(){
  6.     x = x-y
  7.     document.frm.clock.value = x
  8.     setTimeout("startClock()", 1000)
  9.     if(x==0)
  10.     {
  11.         <? print("BAH"); ?>
  12.     } }
  13.     startClock() //-->
  14.     </script>

Basically I want to give users 2 minutes to fill out a form and hit submit, and if they dont do it within that time limit, it unsets some session variables, and does a couple database queries. Can this be done? Am I headed in the right direction?

Reply With Quote
  #2  
Old July 20th, 2004, 11:44 AM
Blindeddie Blindeddie is offline
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: NJ - USA
Posts: 2,152 Blindeddie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 4
RE: Javascript Timer

in order to reset the session variables and run queries, you would need to automatically submit the form indicating that the form was not completed. This would be somewhat annoying to the user as far as I can see.

Reply With Quote
  #3  
Old July 20th, 2004, 05:11 PM
SnowStorm SnowStorm is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 374 SnowStorm User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: Javascript Timer

ok ive got my timer working but i just cant figure out how to get the form to submit, document.frm.submit(); doesnt seem to work, is that the correct code?

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesClient Side Things > Javascript Timer


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT