Yeah, or use AJAX to write the questions to the page and don't allow the called page to be accessed directly... no JS... no questions ;-)
-----Original Message----- From: Robertson-Ravo, Neil (RX) [mailto:[EMAIL PROTECTED] Sent: Friday, September 22, 2006 3:46 AM To: CF-Talk Subject: Re: How do I use JS to let someone know a test question needs to be answered Yep, but if they turn off JS they shouldn't be allowed to see anything, if detected it is off, then you should forward them to "you naughty boy" template. "This e-mail is from Reed Exhibitions (Oriel House, 26 The Quadrant, Richmond, Surrey, TW9 1DL, United Kingdom), a division of Reed Business, Registered in England, Number 678540. It contains information which is confidential and may also be privileged. It is for the exclusive use of the intended recipient(s). If you are not the intended recipient(s) please note that any form of distribution, copying or use of this communication or the information in it is strictly prohibited and may be unlawful. If you have received this communication in error please return it to the sender or call our switchboard on +44 (0) 20 89107910. The opinions expressed within this communication are not necessarily those expressed by Reed Exhibitions." Visit our website at http://www.reedexpo.com -----Original Message----- From: Bobby Hartsfield To: CF-Talk Sent: Fri Sep 22 02:16:55 2006 Subject: RE: How do I use JS to let someone know a test question needs to be answered LOL! "Who's your daddy" To add to Charlie's response... use a type="button" not "submit" then put an onlcick that will submit() the form so without JS, they cant submit it so they can't circumvent your timer by simply turning off JS -----Original Message----- From: Charlie Griefer [mailto:[EMAIL PROTECTED] Sent: Thursday, September 21, 2006 8:33 PM To: CF-Talk Subject: Re: How do I use JS to let someone know a test question needs to be answered start with this. you can mess with the intervals by replacing the static 5000 and 10000 with values from the database (just remember it's miliseconds...not seconds). <html> <head> <script type="text/javascript"> function doSubmit() { alert("You blew it!"); document.myForm.submit(); } function alertUser() { alert("You're gonna blow it! 5 seconds to go..."); } setTimeout('alertUser()', 5000) setTimeout('doSubmit()', 10000); </script> </head> <body> <form name="myForm" method="post" action="page2.cfm"> Who's your daddy? <input type="text" /> </form> </body> </html> On 9/21/06, Will Tomlinson <[EMAIL PROTECTED]> wrote: > I have a friend working on a testing application for his school class. > He wants to have a field for every question where the value would be a time limit - say 60 seconds. > > So he queries the db for the time limit for the question being presented to the user. How would we > > 1. Warn the user his time is almost up with JS > 2. When the time is up and the user hasn't answered, automatically submit the form anyway, passing a reponse value of false. > > I had thought of how you could do it server side, and this solution might end up needing both SS AND JS. > > Thanks, > Will > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:253836 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

