RE: [PHP] javascript timer & php problem

From: Date: Wed, 04 Oct 2000 06:05:24 +0000
Subject: RE: [PHP] javascript timer & php problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-18528@lists.php.net to get a copy of this message
I'm sure someone can think of a more elegant way of doing it, but, this is what i'd probably do. In the bottom frame, when it is loaded, set a hidden element to have the value of the timer when the page is loaded, as well as a hidden element whose value is set when they answer a question. The next question would define the hidden element start time to have the value of the hidden element that is determined when the previous question is answered. You could/should also add a pausing function to the timer in the top frame too. When they submit an answer, it would pause the timer on the top, and, when the next question/page is loaded, it starts the timer again. This would be to ensure the test taker they don't get screwed out of time in case a question/page in the bottom frame fails to load or takes a long time to load. marco -----Original Message----- From: kapil bodhankar [mailto:kkb@onebox.com] Sent: Tuesday, October 03, 2000 10:55 PM To: php-general@lists.php.net Subject: [PHP] javascript timer & php problem hi folks, iam developing a site for online test. my main screen contains two horizontal frames. in the upper frame i've got a timer which i wrote in js.and in the lower frame i have question and 4 choices for selection.which iam calling from a mysql database using $PHP_SELF.well, the time period to complete the test is 1 hr. but then if i reload my page the lower frame is not reloading.and only the upper frame is reloading thereby restarting my timer again. what i mean is suppose i've started my test and am attending some 12th questn.in between i'll reload the page then what i have on my screen is 12th qtn. is as it is displayed but my timer in the upper frame restarts.is there any other way of using timer on the same web page?? but if i use $php_self the moment next qtn gets displayed on the screen the timer also gets restarted which shouldn't happen at all.?? if there is any other way please help me out. thanks in advance. -- kapil kkb@onebox.com - email (202) 777-2645 x3298 - voicemail/fax __________________________________________________ FREE voicemail, email, and fax...all in one place. Sign Up Now! http://www.onebox.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#18528) next »