How to develop a countdown timer in jsp

Hi all, please i have an online test application that works but i want to include a countdown timer that redirects to another page when the time runs out. please, how do i go about it. please help

Thanks, but thats not the one i need. i want the one that will show the time in hh:mm:ss and then automatically take the user to the result page when the time i up. i have a javascript code i used but the problem is in the Result.jsp page, there are some parameters that are suppose to be passed but i dont know how to do it. this is the code:
<form name="frm2" method="post">
<script language="javascript">
var sec = 10;   // set the seconds
var min = 00;   // set the minutes
var targetURL="result.jsp"; //the url
var email=this.Field('email').value;
function countDown() {
  sec--;
  if (sec == -01) {
    sec = 59;
    min = min - 1;
  } else {
   min = min;
if (sec<=9) { sec = "0" + sec; }
  time = (min<=9 ? "0" + min : min) + " min and " + sec + " sec ";
if (document.getElementById) { theTime.innerHTML = time; }
  SD=window.setTimeout("countDown();", 1000);
if (min == '00' && sec == '00') { sec = "00"; window.clearTimeout(SD);
window.location=targetURL;
function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      func();
addLoadEvent(function() {
  countDown();
</script>
<table width="100%">
<tr><b><td width="100%" align="center"><span id="theTime" class="timeClass"></span></td></b></tr>
</table>
</form>and this is are the fields needed in the Result.jsp page..
<input type="hidden" name="email" value=<%=exno%> />
<input type="hidden" name="dbase" value=<%=names%> />
<input type="hidden" name="tamt" value=<%=total%> />

Similar Messages

  • How to make a Countdown timer Script for Live Streaming

    I have flash media server...
    Here's a Scenario:
    User wants to do a Live broadcast.. But.. they don't want to
    just press record and have it starting Streaming Right that second.
    They need a Delay to prepare for their Live Broadcasts.
    Whats the best way for a script for a user to decide how much
    time delay they need before Recording Starts?
    Ideally it would look like this:
    There is a separate window that allows the user to set the
    Self-Timer which will give them time to get ready for their live
    broadcasts.
    User sets length of Time Delay: 30 seconds, 1 minute, 2
    minutes, or even up to 5 minutes.
    User presses Start Broadcast or Record Button to start
    streaming Live Video.
    Then.. the Countdown Timer starts... and it displays in Big
    Digits... the countdown on their screen... "3...2...1...
    Broadcasting Live Now!"
    How would I do this?
    Hope someone can help

    Open the widget library panel and follow the link to Adobe Muse Exchange.
    There you find a fine little widget collection, named Andrews Prototypes.
    Load it, double-click the file, and in your library you will find a countdown widget.

  • Trying to figure out how to make a countdown timer...

    Okay, so I finished my Java class for the semester (I got an A) =) and I'm trying to learn to make a countdown timer in my spare time. I just want something that I can add the date and time of what I'm counting down to into it and then just a simple GUI that sits on my desktop counting away. Of course the problem is I've never used time before in any of my assignments and so I'm really not sure how any of it should work. Anyone know any tutorials or methods/classes that could help me with something like this?
    Thanks

    I made something similar to that, it counts down in either seconds/minutes/hours/days to a specific date. I ended up doing a Google search and found a useful class called DateUtil that someone had written. It was very useful for doing all the nasty Calendar work and that kind of thing.
    Besides that, the GUI should be really easy, especially if you have already done a semester of Java. I used an uneditable TextField.
    Anyhow, I can put up some more detail if you need it, just ask.

  • How to create a countdown timer to every Friday in AS3?

    I understand how the date class works but i just cant figure out how to get it to count down to every Friday..

    you want it to countdown to the next friday?  and, is the user's date/time system clock accurate enough for your needs?

  • How to create&reference countdown timer on a column in Apex ?

    Hi all,
    I have a table with some info about online auctions and in there we have 2 columns : Start Date/End Date.
    I want to create a report based on that table in which to show the details about the auctions and the "Remaining Time" (as End Date - Start Date)
    For this specific column,on the last 5 minutes of an auction, I want to have a count down timer that will be refreshed every seconds, thus reflecting the time left.
    Has anyone tried this before? If so, I would really appreciate some advice or an example ...
    Thank you,
    Ana-Maria

    Hello Ana-Maria,
    You need to incorporate a Javascript timer to achieve that kind of behaviour. Just Google aorund (something like [http://www.javascript-page.com/timer.html]).
    Regards,
    Roel
    http://roelhartman.blogspot.com/
    http://www.bloggingaboutoracle.org/
    http://www.logica.com/

  • How to implement countdown timer in apex

    Hi all,
    I want to implement timer in my application.i am working on apex 4.0 version.I am developing online test application,so for this i want to display timer for test.
    can anyone suggest me how can i implement countdown timer in my application.
    thanks
    jitu

    Hi,
    You can refer "Martin Giffy D'Souza's" Enhanced APEX Session Timeouts example
    http://www.talkapex.com/2009/09/enhanced-apex-session-timeouts.html
    Regards,
    Kartik Patel
    http://patelkartik.blogspot.com/
    http://apex.oracle.com/pls/apex/f?p=9904351712:1

  • Countdown Timer

    Can anyone gve me any advice on how to make a countdown timer
    in actionscript 3?
    I have tried several ways and have so far been
    unsucessful.

    Here's something simple:
    var endDate:Date = new Date(2012, 11, 21);
    var t:Timer = new Timer(500);
    t.addEventListener(TimerEvent.TIMER, msLeft);
    t.start();
    function msLeft(e:TimerEvent){
    var now:Date = new Date();
    var ms = endDate.valueOf() - now.valueOf();
    var secs = Math.floor((ms / 1000) % 60);
    var mins = Math.floor((ms / 1000 / 60) % 60);
    var hours = Math.floor((ms / 1000 / 60 / 60) % 24);
    var days = Math.floor((ms / 1000 / 60 / 60 / 24) % 365);
    var years = Math.floor(ms / 1000 / 60 / 60 / 24 / 365);
    trace(years, "years", days, "days", hours, "hours", mins,
    "minutes", secs,
    "seconds");
    Dave -
    www.offroadfire.com
    Head Developer
    http://www.blurredistinction.com
    Adobe Community Expert
    http://www.adobe.com/communities/experts/

  • Need help on countdown timer!

    Could someone please guide me in the direction as to how to make a countdown timer?  I created a timer that counts down to a certain date, but I just want the timer to countdown 24 hours, not to a certain date.  I also want to have a button below the timer so that when you click it, it adds 30 seconds to the timer.  Can anyone help me with this?

    Hi,
    I hope it will be use full for u....
    var timelong=2000;
    var mytimer:Timer=new Timer(timelong,1);
    mytimer.addEventListener(TimerEvent.TIMER_COMPLETE,myfunc);
    mytimer.start();
    function myfunc(event:TimerEvent)
        trace("hi it's working");
    mybut.addEventListener(MouseEvent.CLICK,addtime);
    function addtime(event:MouseEvent)
        timelong+=3000;
    Thanks,
    K Swamy Vishnubhatla,

  • Possible to insert a countdown timer into an iMovie clip?

    I'm making an exercise video, and I want to insert an occasional small clip with a countdown timer.  Ideally, it would be some beautiful nature footage (like waterfalls or wildlife), with a countdown timer in the corner.
    Does anydbody know how to insert a countdown timer into an iMovie clip?
    For that matter, does anybody know where I could find/purchase 2 minutes of nature footage?

    Sure you can. What you need to do is add the initial image to the topic then create an image map. This allows you to define shapes that when the user's mouse hovers over it indicates that there is a hyperlinkto another topic. Just right click on the image, select Insert Image Map and go from there.
      The RoboColum(n)
      @robocolumn
      Colum McAndrew

  • How can I make a countdown timer using After Effects

    I'd like to make a video that has a timer that counts down one second at a time. I need one starting at 5:00 (five minutes). Is there a way to easily do this in After Effects without having to manually change the text every second?
    Thanks.

    I'm glad that you found a solution, but I thought that you might appreciate a suggestion of another approach.
    Colin Braley provides a tutorial and example project on
    his website that show how to use an expression on the Source Text property to animate text to overcome some of the limitations of the Numbers effect.
    There's a similar example in the
    "Example: Animate text as a timecode display" section of After Effects Help.
    Here are some Community Help searches that can lead you to some ideas, too:
    Community Help search for 'countdown timer'
    Community Help search for 'digital countdown timer'

  • How to create countdown timer with sound

    Any ideas on how to create a minute and seconds countdown timer that would play a sound and then redirect you to another page?

    Hi,
    There is no out of the box solution to do so in Muse at the moment. If you can get your own code, you can add it to your site using "Insert HTML" feature.
    Regards,
    Aish

  • How to develop and Run .jsp page from Jdeveloper 10g

    Dear All,
    I need to develop one small JSP page using Jdeveloper10g. pls share information How to develop and Run .jsp page from Jdeveloper 10g.
    Thanks in Advance,
    Hanimi.

    Hi Gyan,
    Any Idea how to get DB connection for JSP Pages.
    Our Java guys developed one JSP page for Login page.
    After Log in instead of standard responsibilites page we calling custom jsp page, For getting DB connection they defined one properties file and hard coded DB details on that file and calling, but client is not accepting hard coding.
    Pls give any idea for getting DB connection directly in JSP pages.
    Hanimi.

  • How can i improve this 2min countdown timer?

    Hello
    I'm trying to see if anyone has any ideas on how to improve this simple 2 minute countdown timer.  All suggestions are welcome!
    Thanks in advance!
    -noviceLabVIEWuser
    Solved!
    Go to Solution.
    Attachments:
    2min Countdown Timer.vi ‏38 KB

    As an alternative, I used a case structure to eliminate some calculations for Sample Time while Air Time is counting down and vice versa.  I don't know if this is necessarily better.  Your original code was simple and it worked fine.
    False case showing:                                          ​                                 True case showing:
    - tbob
    Inventor of the WORM Global

  • How can I create an animated countdown timer?

    Is there a way to create an animated countdown timer in Adobe Fireworks (animated gif)?
    Thank you

    In the Edit workspace, place the images you want to appear in each frame of the animation on separate layers of the Layers panel. For example, to create an animation of an eye blinking, you would place an image of the open eye on one layer, and an image of the closed eye on another layer.
    Choose File > Save for Web.Note: If your image has multiple layers, you can also open the Save For Web dialog box from the Save As dialog box by choosing CompuServe GIF Format and selecting Layers As Frames.
    Optimize the image in GIF format.
    Select Animate.
    Set additional options in the Animation section of the dialog box:
    Loop Continuously repeats the animation in a web browser.
    Frame Delay Specifies the number of seconds that each frame is displayed in a web browser. Use a decimal value to specify fractions of a second. For example, use .5 to specify half a second.

  • How do i add a countdown timer in as3 that starts when the program begins?

    I also want it to remove everything that is on the stage when it reaches 0 and produce a Game Over screen.

    import flash.events.TimerEvent;
    import flash.utils.Timer;
    var countdown:Timer = new Timer (1000,TARGET_TIME);
    //after 60 Seconds every DisplayObject will be removed from stage
    const TARGET_TIME:int = 60;
    countdown.addEventListener(TimerEvent.TIMER, tick);
    countdown.addEventListener(TimerEvent.TIMER_COMPLETE, gameOver);
    function tick(e:TimerEvent):void {
        //this will count upwards 1.2.3.4....
        trace(e.currentTarget.currentCount);
    function gameOver(e:TimerEvent):void {
        // this function will remove all DisplayObjects from your Stage
        // starting from the top
        //It will not remove shapes or anything the user might have drawn on the stage
        //just things that are accessible to ActionScript (Sprites, MovieClips)
        for (var i:int = this.numChildren-1 ; i >= 0; i--) {
            removeChildAt(i);
    //countdown will start only if you call it explicitly
    countdown.start();

Maybe you are looking for

  • How to unlock my iphone 5

    forget my passcode how to unlock my phone

  • X1900gt g5 edition in the uk

    hello. Has anyone heard or seen any news about the X1900GT G5 Edition PCIe card for the UK market? It's to replace the Geforce 6600 in my late 2005 2.3 G5. I cant find it at the Apple store and it looks like it's only available from US resellers. Tha

  • How do I access my scanner

    Hi I am having a problem with accessing my scanner. I used to scan documents via Presto page manager but that is not now compatible with Lion. How do I find the scanner in my system? Would be grateful for any help, thanks

  • Using mx:itemRenderer for my extended List class

    Create a new class MyList extends mx:List; then <my:MyList> mxml tag can't enclose <mx:itemRenderer>. How can I keep using <mx:itemRenderer> with MyList class in MXML? (I can create a separate MyItemRenderer class and set to <my:MyList itemRender="my

  • Error DLL in windows Install Package Softwares

    hi i have problem to install softwares Error: please help me...