To set the timer in the Screen for online test

Hi all,
This is sujoy here....
i am developing  a tool in SAP for Evaluation /test of any subject or topic  where i have to incorporate the Timer Concepts as i will set this in the screen which where remaining time will decrease after each second like Online Test using web pages and after a predefined duration of 30 min( or 45 min or something like that) when that preset time is elapsed completly,the "SUBMIT" pushbutton  will be Triggered automatically( if candidate does not press it within the duration).
Is there any FM or Program regarding this concepts...
Need your help...
Regards,
Sujoy

Hi Sujoy,
Addition to my previous post..Use the JavaScript I mentioned in my previous post in the onload of your BSP page. And after 30 minutes or so submit the form, you need to make a addition to the java script given in that link.
See this code:
<%@page language="abap" %>
<%@extension name="htmlb" prefix="htmlb" %>
<head>
<SCRIPT LANGUAGE = "JavaScript">
<!--
var secs;
var timerID = null;
var timerRunning = false;
var delay = 1000;
function InitializeTimer()
    // Set the length of the timer, in seconds
    secs = 50;
    StopTheClock();
    StartTheTimer();
function StopTheClock()
    if(timerRunning)
        clearTimeout(timerID);
    timerRunning = false
function StartTheTimer()
    if (secs==0)
        StopTheClock();
        // Here's where you put something useful that's
        // supposed to happen after the allotted time.
        // For example, you could display a message:
        alert("You have wasted 50 seconds.");
        document.form1.submit();
    else
        self.status = secs;
        secs = secs - 1;
        timerRunning = true;
        timerID = self.setTimeout("StartTheTimer()", delay);
/-->
</SCRIPT>
</head>
<htmlb:content design="design2003" >
  <htmlb:page title  = "Timer test application "
              onLoad = "InitializeTimer()" >
    <htmlb:form id="form1" >
      <htmlb:button text    = "Submit"
                    id      = "but01"
                    onClick = "myEvent" />
    </htmlb:form>
  </htmlb:page>
</htmlb:content>
OnInputProcessing you navigate to next page using
navigation->goto_page( 'second.htm' ).
Hope this helps...
Regards,
Ravikiran.

Similar Messages

  • I dropped my iPhone 5c and it wont turn on but its constantly vibrating. I have tried holding the home and lock screen for a long time but nothing has happened. How can I fix this?

    I dropped my iPhone 5c and it wont turn on but its constantly vibrating. I have tried holding the home and lock screen for a long time but nothing has happened. How can I fix this?

    You make an appointment at the genius bar of your local Apple Store and get it serviced/replaced. You broke it. If you can't even force a reboot, there's nothing much more you can do.

  • Can I run 2 monitor with one of the monitor having Full Screen for Elgato Eye TV?

    My mac mini has Elgato 'Eye TV' software that runs in 'Full Screen'.  I want to keep this setting & also connect another monitor to the macmini & use other Appilications on the other monitor?  Can I run 2 monitor with one of the monitor having Full Screen for Elgato Eye TV?
    My early 2009 macmini can run Mac OS 10.5, 10.6, 10.7 & 10.8

    Yes, run one from HDMI and the other from Thunderbolt/minidisplayport sockets. In EyeTV Preferences check the screen you want for full screen use and make sure your Dock is on the other one.

  • Missed one letter at the time of creating account for icloud. how do i fix or create another email account?

    Missed one letter at the time of creating account for icloud. how do i fix or create another email account?

    Hi jtv123,
    Could you please tell us exactly what happens when you try to set up your account?
    With kind regards,
    David

  • What does it mean when the screen shows only the time and the play button

    what does it mean when i turn on my i-pod and it has a white screen and all it displays is the time and the play button cant get to the main screen to play music

    Is the hold switch in the on position?  Try resetting the iPod. To do this, press and hold both the Select/Center and menu buttons together long enough for the Apple logo to appear.  The iPod may have simply locked up.
    B-rock

  • I use my time capsule for wifi station and back up. However suddely time machien can no longer find the time captule drive , used for back up...

    Time machiene can no longer find the back up files on my time captule..
    I have have manged to see the files via finder.
    dleted the files, and also gave time captule a new name, and pasword.
    All seemd fine but somehow the new back up could not be finished.
    Repeated all the steps, but now had the  computer hooked up to the time captule with a network kabel ( make it go quicker..)
    Still no succes...
    Seems somhowe acces to the time captule is difficult for the time machien software...

    You may find useful advice in this post.

  • I use floating time zone with all of my iCal entries.  But then the times of the entries do not print when printing month view.  Is there a fix for this?

    I use floating time zone with all of my iCal entries.  But then the times of the entries do not print when printing month view.  Is there a fix for this?

    Sorry to have repeated this question as if I were answering it.  Just a mistake.  I'm just now learning how to use this site.

  • HT201263 my ipad give me the apple sign without running up it appears all the time in the screen , i tries to reset my ipad , but still in this problem , can you please help me?

    my ipad give me the apple sign without running up it appears all the time in the screen , i tries to reset my ipad , but still in this problem , can you please help me?

    You may want to look at this about using recovery mode to restore your iPad.
    http://support.apple.com/kb/ht4097

  • I just purchased a 3TB Time Capsule.  I live in Italy and have 220V power.  The Time Capsule is rated for that, but the cord says 125V.  Can I use this cord with an adapter, or do I need to buy a new cord at an Italian store?

    I just purchased a 3TB Time Capsule.  I live in Italy and have 220V power.  The Time Capsule is rated for that, but the cord says 125V.  Can I use this cord with an adapter, or do I need to buy a new cord at an Italian store?

    Due to the kind of plug used the US power cord is rated at the 125v value.. and legally we cannot advise you to use on higher voltages.. although I have never had issues in Australia.. 240v.
    But adapters from your Euro power plug to US are generally ugly .. unsightly things.. and often sit high above the socket and are none too stable.. I agree with Bob.. just go out and buy a standard figure 8 power cord.. check with Apple in Italy for a white one.. if you are going to have it on show.. black are far more common. Or even check ebay for a standard power Apple power cord as a number of items they sell use the figure8 socket. 

  • For the iphone4, my light is on all the time! the light is supposed to turn off after a few seconds of use. how can i fix this?

    for the iphone4, my light is on all the time! the light is supposed to turn off after a few seconds of use. how can i fix this?

    If what Allen says does not fix the issue I have seen this as a Hardware issue and I would get into an Apple Store if it is close by
    http://concierge.apple.com/reservation/us/en/

  • Itunes writes off $ 1 each time they connect to the Internet. Shopping at the time was not. For what? How do I know?

    Itunes writes off $ 1 each time they connect to the internet. Shopping at the time was not. For what? How do I know?

    Itunes writes off $ 1 each time they connect to the internet. Shopping at the time was not. For what? How do I know?

  • Timer works if I set the time before the current one

    Hi,
    I've got a block that is part of an actionListener that has 4 buttons, anyway I want the timer to execute something exactly at the time I set it.....but in the code that I have it also executes if i set the time before the current time
    Here's the segmant:
    private class ButtonResponder implements ActionListener
              public void actionPerformed(ActionEvent event) 
                    if (event.getSource() == exitButton)
                                  System.exit(0);
                   if(event.getSource() == setButton)
                        int hour = Integer.parseInt(hours[hourComboBox.getSelectedIndex()]);
                        int min = Integer.parseInt(minutes[minuteComboBox.getSelectedIndex()]);
                        Calendar calendar = Calendar.getInstance();
                        calendar.set(Calendar.HOUR_OF_DAY, hour);
                        calendar.set(Calendar.MINUTE, min);
                        calendar.set(Calendar.SECOND, 0);
                        Date time = calendar.getTime();
                    timer = new java.util.Timer();
                        timer.schedule(new TimerTask()
                             public void run()
                                  JOptionPane.showMessageDialog(null, "it is time");
                        , time, 5*1000);
                   if (event.getSource() == cancelButton)
                        timer.cancel();
              }So if I put zeros in hours and minutes it will execute immediately....how can I make execute at the exact time (so that if the time now is 2:00 and I set it to 1:00 it only executes the next day??
    Message was edited by:
    Octavian

    Bump the day if the time is less than current time.
    Kaj

  • Reboot the iphone to install a program and has been left all the time with the apple on the screen

    reboot the iphone to install a program and has been left all the time with the apple on the screen.
    takes so hours without turning away. I can do?

    Reset your phone , you wont lose anything. Hold the home and off button down until the apple symbol comes up.

  • HT1338 My Mac book Pro is running very slow and the rainbow ball is appearing all the time. Any suggestions for clean up??

    My Mac book Pro is running very slow and the rainbow ball is appearing all the time. Any suggestions for clean up?? I have the OS X Lion system.

    As well as what a brody asked :
    - do you need more RAM? (run Activity Monitor and see how much free RAM - green - is available)
    - do you Restart fairly regularly, e.g. at least once a week, to clear out any swap or temporary files?
    - do  you need to do maintenance, e.g. clearing out caches and unused logs, etc?

  • What is the price of new screen for mac air 11'', coz mine is broken

    what is the price of new screen for mac air 11'' in singapore, coz mine is broken, the lcd crashd, whatever

    You may have to check local official authorized Apple service providers for a price or estimate on the cost of repair parts and labor; there may be other companies than those officially listed in the locator page here http://www.apple.com/sg/service/ in the Singapore area, that can do the job. Be wary of those not Authorized or Certified, since these may not use the correct parts or may not be properly trained in the repair procedure.
    In the case of a computer still under offiical original or extended Apple warranty, when accidental damages cause need for a repair, be sure to get the damage fixed in an authorized repair facility so as to keep the remainder of the offiical warranty in effect. Unofficial repairs by unqualified persons can void the remainder of a factory warranty; while the damage may not be covered at all, the rest of the computer could retain coverage if it is repaired correctly using Apple trained and authorized service personnel and original equipment parts.
    So, be sure if you find a shop that can do a repair, that it won't make matters worse by performing inexact or  sub-par service; and if the computer no longer has an official warranty on the remainder of the unit (outside of the accidental damages not covered anyway) you may be able to find a good display, new or used, and have another service company replace the one in your MB/Air. Depending on what build year-model MB/Air 11" you have, the parts may vary; so be sure to research whoever can do this job, so it may be done correctly. 
    There are independent authorized Apple repair agents with certified technicians who use correct parts, so maybe you can find one in your region; at least to initially research the costs involved in restoring the MB/Air.
    Not sure which model you have, but for something out of warranty or damaged in a way to no longer be covered, you may see what may be involved in doing a repair or parts swap, yourself; the following may be helpful in restoring this model.Or give you an idea, should it be too technical for a DIY fix.
    MacBook Air Repair - iFixit:
    http://www.ifixit.com/Device/MacBook_Air
    However that works out...
    Good luck & happy computing!

Maybe you are looking for

  • Getting an "unable to Load the tables in the power pivot window" error

    Hello, I have 2 worksheets in a excel file and would like to load both into a power pivot table. When I click the 'create linked table' in the pwer pivot ribbon, The powerpivot window open and looks like its about to load the data but then I get a po

  • How to delete client (urgent plz help me )

    hi friends           i have created a client in my system and i have done client copy in my system (local client copy) why copying i got an error that is there is no enough space in the drive  so i want to delete the client and copyed data .can any o

  • Using XSLProcessor in $ORACLE_HOME/lib/xmlparserv2.jar giving error in 10g

    Being absolutely frustrated with the generic FOTY 001 fault for any mapping failure I tried looking for different solution in web.I did actually find out some interesting soutions which is to use XSLProcessor class $ORACLE_HOME/lib/xmlparserv2.jar fo

  • Can't attach files to email, only folders

    This problem happens with Apple Mail, when I click the paperclip icon - the subdirectory appears but I cannot open any folders. I also cannot adjust the view (list, icons, etc). I can attach entire folders, but that's not what I want to do (I want to

  • Running Through two Mapping programs

    Does someone know a good blog or explanation for explaining a scenario where data is mapped through two mapping programs as it is passed through XI?