function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
vickySFDCvickySFDC 

How to display only Time duration (01:30:00) in VF pages while clicking start btn?Urge​nt help

Hi All,

 

My requirement is I have to develope Quiz Appln like SFDC Certificationexams  while clicking launch Btn then exam will start then time & seconds is displayed in each qns.Same functionality  I have to display in my Quiz Appln while user clicking Start btn time & seconds(01:30:00) should display in top of the page.In salesforce we dont have datatype like Time & Seconds ?How to write page and class?How to work this scenario pls help me ...Give example Urgent help needed

Thanks,

 

Vicky

AdrianCCAdrianCC

You can format the DateTime to show only the Time part. See here: http://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_outputText.htm 

 

My suggestion for the timer animation of the page is smth like this: http://jchavannes.com/jquery-timer/demo

 

Ty,

Adrian

bob_buzzardbob_buzzard

When I looked into doing something similar I ended up using a JavaScript utility with the intention of executing an actionfunction once the timer expired.  It didn't really work that well though, mainly as my users were navigating to different pages, which meant I had to try to calculate the amount of time left to restart the timer, and in the event of a slow internet connection they lost out on quite a bit of time.

 

There are plenty of javascript countdown timers around - for example:

 

http://www.gieson.com/Library/projects/utilities/countdown/