Meaningless Drivel is fun!*
The moose likes JSP and the fly likes Having problem to include clock in jsp page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Having problem to include clock in jsp page" Watch "Having problem to include clock in jsp page" New topic
Author

Having problem to include clock in jsp page

Rinkit Shah
Greenhorn

Joined: Aug 16, 2011
Posts: 26
I am making an online exam application by using Jsp and Servlets.

What I want to do is clock should start when exam begins and on submitting question and going to next question clock should not get reset

I tried using frameset by keeping clock related data in another page and question in another but the problem is that it divides the screen in two pages and result is dispalyed in both the pages question page as well as timer page .

I am not getting clue of what to do by using hidden text field as disscussed in article posted by Urvi.

Can anyone please help us out...Thank you...!
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12675
    
    5
The usual approach would be to save the start time in the session.

Are you trying for a count-down clock shown on the question page or what?

Bill

Java Resources at www.wbrogden.com
Rinkit Shah
Greenhorn

Joined: Aug 16, 2011
Posts: 26
Yes I am using session to monitor my start time and accordingly manipulating my end time by few minutes. On click of submit button it will check for test end time and if time is over it will be redirected to result page. But to give user some hint on how much time is left to the user I am using a clock on same page. How to attach a file I want to attach my code for your reference.

Thanks William.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12675
    
    5
Even if you attached your file I would not look at it.

If you want a dynamic countdown clock on the page - that is the realm of JavaScript - which you could write into the question page.

I suggest you experiment with a static HTML page and Javascript until you get the countdown working as desired.

Bill
Rinkit Shah
Greenhorn

Joined: Aug 16, 2011
Posts: 26
Thanks William,
I have made two arrangements for clock one is in javascript which will show user how much time is remaining and the other one is made by setting session. So, even if user disables javascript session will monitor his timings. Thanks thanks a lot for investing your time.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Having problem to include clock in jsp page
 
Similar Threads
How to Decide what to do
examination system : countdown timer ?
using check box...disabling/enabling of a page
awaiting your suggestions...
Question of hiding resource from client