How to get the running time on the page

Hello ,
I want to display the running clock and the user who loggin in .
Pls let me know how to get the running clock display and the username who log in.
thakns
kumar

Hi,
You can use javascript clock and substitution string APP_USER
Place this to HTML region source
<input type="text" id="clock" /><span>&APP_USER.</span>
<script language="JavaScript">
function runClock(){
theTime = window.setTimeout("runClock()", 1000);
var RightNow = new Date();
var hrNow = RightNow.getHours();
var mnNow = RightNow.getMinutes();
var scNow = RightNow.getSeconds();
var miNow = RightNow.getTime();
var mon = RightNow.getMonth() + 1;
var date = RightNow.getDate();
var year = RightNow.getFullYear();
var day = RightNow.getDay();
if(hrNow == 0) {hour = 12;var ap = " AM";}
else if(hrNow <= 11) {ap = " AM";hour = hrNow;}
else if(hrNow == 12) {ap = " PM";hour = 12;}
else if (hrNow >= 13) {hour = (hrNow - 12);ap = " PM";}
if(hrNow >= 13) {hour = hrNow - 12;}
if(mnNow <= 9) {min = "0" + mnNow;}
else{min = mnNow}
if (scNow <= 9) {secs = "0" + scNow;}
else {secs = scNow;}
var zday=new Array(7)
if (day==0) {zday="Sunday"};
if (day==1) {zday="Monday"};
if (day==2) {zday="Tuesday"};
if (day==3) {zday="Wednesday"};
if (day==4) {zday="Thursday"};
if (day==5) {zday="Friday"};
if (day==6) {zday="Saturday"};
var zmon = new Array(12)
if (mon==1) {zmon="January"};
if (mon==2) {zmon="February"};
if (mon==3) {zmon="March"};
if (mon==4) {zmon="April"};
if (mon==5) {zmon="May"};
if (mon==6) {zmon="June"};
if (mon==7) {zmon="July"};
if (mon==8) {zmon="August"};
if (mon==9) {zmon="September"};
if (mon==10) {zmon="October"};
if (mon==11) {zmon="November"};
if (mon==12) {zmon="December"};
$x('clock').value=""+zday+", "+zmon+" "+date+", "+year+" "+hour+":"+min+":"+secs+ap+"";
runClock();
</script>Use styles to get look you like to input and span tag
Br,Jari

Similar Messages

  • How to get Date and time of the server?

    Hi, How can we get the date and time of the server while submitting a form using JSP? i.e I need the date and time , when the user is submittig a registration.
    Uma

    Upon receiving your data in your servlet, you can do the following to get the date,
    Calendar calendar = Calendar.getInstance();
    int dd = calendar.get(Calendar.DAY_OF_MONTH);
    int mm = calendar.get(Calendar.MONTH) + 1;
    int yyyy = calendar.get(Calendar.YEAR);
    String dd_mm_yyyy = dd + "/" + mm + "/" + yyyy;
    To get the time, simply take a look at the Calendar API to get the corresponding field.

  • How to get currently running tcode inside the user exist

    Hi All,
    I want to write user exist for me22n & me23n, inside the user exist i want to check tcode whether tcode is me22n or me23n my user exist is ME_PROCESS_PO_CUST
    .please help me
    Thnx//

    Hello Gevan,
    Please check the value of sy-tcode for both transaction in debugging mode in the exit and write your code accordingly.
    case sy-tcode.
    when 'ME22N'
    *ur code
    When 'ME23N'
    *ur logic
    endcase.
    find the screen shot from debugging
    Thanks

  • How to know the timings of the run time of thr report

    Hi,
    Can you please tell me how to know the run time of the query , i mean how much time it took for the query to dispaly the results .
    Also we have these queries in the workbook. How to refresh the work book . is it enough if i refresh the query.
    Thanks
    Sruthi

    Hi
    How can we check in RSRT tcode?
    And how can we do i RSRTRACE?
    Can  I know the procedure.

  • How to specify a different directory for the Run-Time Engine?

    With LV 7.1 it's become even more difficult to create installation sets in third-party tools without having to include the full run-time engine separately.
    If you use any of the advanced analysis VIs you have to install the run-time engine (no use in including files in the same directory as the built application) and if you do and you use the old serial VIs you get a problem because the application will load the run-time from the main run-time installation and then look for serpdrv in that directory, not in the application folder...
    So - being forced to use the installer builder in the application builder and include the run-time engine in the installation kit I wonder whether it is possible to specify where the run-time should be installed?
    By default it will go in a directory called National Instruments in the program files folder, however that is not ideal due to the fact that the users have no relation to the fact that our application needs something from NI...and may end up deleting the directory ("National Instruments? - what do I need that for...let me delete it...). We would like to be able to specify that the run-time is installed silently in a directory named with our company name instead.
    MTO

    When you create the stand alone, in options you can actually set the temp directory and default directory. You can change it there OR in goto options and check for libraries/directories. You can change it there too.
    Kudos always welcome for helpful posts

  • Will hardware drivers work with the run-time engine or only a full version of Labview?

    Hello.
    I'm trying to get a quatech I/O card to work. The instructions with the drivers we were given state "you must have labview installed before installing these drivers".
    A program I wrote on my machine works fine with those drivers and does toggle outputs on the card, but when I build it into an executable on our test unit (doesn't have a full version of Labview, just the Run-Time engine) the card doesn't work.
    We installed the run-time engine on the unit, then the drivers.
    I guess my question is: Do most drivers work with both the full version of Labview and the run-time engine? Or do I need to somehow 'convert' these drivers to work with the run-time engine?
    Th
    anks for your help!
    Dave Neumann
    [email protected]

    Dave:
    I can't determine which dll is required but if there are more than one that
    shipped with the quatech I/O card try to placing one dll at a time in the
    same directory as the exe so that you can determine which one is the
    required one. If that doesn't do it then it may need more than jsut one of
    the dlls so placing all that came with the quatech I/O card s/w driver
    package in the same directory as the exe should do the trick.
    Best of luck.
    -Tom
    "Neumannium" wrote in message
    news:[email protected]..
    > Tom,
    >
    > Thanks for your reply. One of the problems I'm having is figuring out
    > which .dll I would need to include (I'm not a software guy).
    >
    > Would the .dll your speaking of be different th
    an the one which is
    > installed with the drivers? I'm looking at a .dll that is installed
    > when you install the labview drivers for this card, but the run-time
    > engine still doesn't want to get the card to work. (The file installed
    > when I install the drivers is called 'daqlv32.dll' and I don't know
    > how to find any other .dll's I might need)
    >
    > Actually, it appears the card 'is' being seen by the run-time engine,
    > but I'm getting impulses rather than distinct changes of state.
    >
    > Anyway, thanks for the help.
    >
    > Dave Neumann
    > [email protected]

  • Can i change the running time of an itunes song?

    I have made a slideshow that incorporates several vacations running in a continuous loop.  I used different songs from itunes for each individual vacation, i.e., Mexico, Bermuda, etc..  The timing of the slideshow segments(vacations) do not match the running time of the songs. (close but not quite)  The songs are all in the order needed, on the same itunes playlist.  I need to change either the running time of the music or maybe as a last choice, delete or add more photos. Can the running time for a song be condensed or expanded ?

    John,
    The use of the "Stop" time in iTunes gives you an abrupt end, not a fade-out.  If you play back with "Cross-Fade" turned on, you will not notice it.  Cross-Fade can be turned on in Edit > Preferences > Playback.
    Note that Cross-Fade causes overlap, so will affect the timings.
    If you actually want to edit the file to have a fade-out, you will need 3rd party software such as MP3 Trim, or Audacity, and then put the editied file into iTunes.

  • How can i get the System Time from the other host

    I want to get the System Time from the other host in the LAN,How can I get the Time using Java.
    Such as I am in WIN 2000 and I have a Unix host in LAN, I want to get unix host System time, How can I do it.

    Open a socket to port 13 and read a string with the time.
    -or-
    Open a socket to port 27 and read 4 bytes that are a network order timestamp
    Assuming that your UNIX machine has those services running, most do

  • [Urgent!!]How to control the running time??

    Hi,
    I'm an undergraduate researcher in the University of Michigan. I used NI labVIEW FPGA on my current project and now i meet a problem.
    I have a labview code that has runs with 3 subroutines. they execute one after another for a given time period for each iteration of the entire code. that is i built them in a flat sequence structure inside a large while loop and each of the subroutine is a while loop with several subvi's in it. not that complicated but i have to specify how long each subroutine runs. now i have a problem to set that execution time. i don't know exactly what kind of timing function i shall use. i tried the "Elapsed time" function but that only works for the first iteration. from the second iteration on each subroutine only runs for once, instead of continuing to run until the given time elapsed. so i don't know how to correctly control the running time. It's reallly urgent, so could you please give me some suggestions about it? Thanks a million!!
    Xiaofei

    Thank you for your suggestion!
    sorry but that this method won't help because my code is sort of difficult to put into a for loop .
    the logic is like this: first the output is set to 0 for a user-defined amount of time (means no excitation). secondly it gets excitation and gets output but no data saving is allowed for a user-defined amount of time. at the same time, one paramater is automatically changed. (the reason for not saving data is that there is a transient response when the parameter changes). thirdly, data saving begins with the same
    parameters as before, also for a user-defined amount of time. and then after these three steps one iteration is done. for iterations there is a different parameter, the user defines the range of the parameter and the number of different values in between and the code will do the increment at equal intervals automatically. my problem now is that i don't know how to correctly control the time. i have tried various ways but no one works.
    the second problem is that i don't know how to let it run and not saving data and then saving data without changing everything else. what i have now is to call the same VI twice, once for only running and no data saving and the other for saving data. but then the problem is that in between these two routines, the output suddenly becomes zero and gets excited again after i call it.  My professor said that i cannot let the output become zero, otherwise there is no meaning in waiting for the excitation to become stablee. but then i don't know how to call a VI only once and let it do the saving for only the latter part of the running time. i have been working on this thing for two weeks now and still have no idea....Sorry the problem is long and tedious, but if anyone have any idea about it, please let me know, i will be most grateful. Thanks a million!!!

  • Although my ipod shows the number of steps, calories, and time, it no longer is saving it to the history. also when I open the history it takes me to May 2010 instead of the current date. Any ideas on how to get it to start recording the history again?

    Although my ipod shows the number of steps, calories, and time, it no longer is saving it to the history. Also when I open the history it takes me to May 2010 instead of the current date. Any ideas on how to get it to start recording the history again?

    Try:                                               
    - iOS: Not responding or does not turn on           
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - Try another cable                     
    - Try on another computer                                                       
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
    Apple Retail Store - Genius Bar
    The missing apps could have been done by setting the Restrictions that can hid those apps. If the backup was made with those retrictions set the the Restrictions are also restored.
    Thus, if you get it to work restore to factory settings/new iPod, not from backup                               
    You can redownload most iTunes purchases by:        
      Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • HT1222 My phone is telling me about a Software Update but for the first time it is asking me for a passcode, I have never set up a passcode and do not know how to get around this to do the upgrade?

    My phone is telling me about a Software Update 7.1.1 but for the first time it is asking me for a passcode, I have never set up a passcode and do not know how to get around this to do the upgrade?

    See if this helps:
    iOS: Forgotten passcode or device disabled after entering wrong passcode
    http://support.apple.com/kb/ht1212

  • Every time I try to download the new version of Adobe Flash Player it saves as a .txt file and I do not know how to get it to save in the correct format.

    Every time I try to download the new version of Adobe Flash Player it saves as a .txt file and I do not know how to get it to save in the correct format.

    Please post in the Adobe Flash Player forum.

  • How to get Basic salary amount in the Housing formula to calculate the housing value as I used the DBI (NICDP_EMPLOYEE_BASIC_SALARY_AMOUNT_ASG_ENTRY_VALUE) but when run the Quick pay for the housing element alone result come 0, How to get Basic salary amo

    How to get Basic salary amount in the Housing formula to calculate the housing value as I used the DBI (NICDP_EMPLOYEE_BASIC_SALARY_AMOUNT_ASG_ENTRY_VALUE) but when run the Quick pay for the housing element alone result come 0, How to get Basic salary amount in the Housing formula to calculate the housing value as I used the DBI (NICDP_EMPLOYEE_BASIC_SALARY_AMOUNT_ASG_ENTRY_VALUE) but when run the Quick pay for the housing element alone result come 0

    Hi,
    Is your formula attached to basic salary element or some other element? You need to make sure that basic salary element has some value and is processed before this formula is called. Are you able to see value for basic salary element after payroll run?
    Regards,
    Pawan

  • How to make a text field required at run time when the user clicks the checkbox ?

    I got a form where , there are several checkboxes and text fields associated with that checkboxes.If the use clicks on the check box then the associated
    text fields should become required.I have tried the change event and the click event for the checkboxes.It gives error in the onChnage event and I got some weird results in the on click event .Sometimes if the user click the check box , then for the 1st time the field doesnt become required , then the user onclicks the check box and when the user clicks the checkbox for the second time the field becomes required,but if i deselects the highlighted field option and selects it again the field becomes required even if the user onchecks it I am totally confused !!! Adding to it i have also written the wrong code still i achieved the desired result ?? How it can be possible . I am writing the codes below , please help me as i am working under a deadline from the client.
    onChange event :
    var newVal = this.boundItem(xfa.event.newText);
    if(newVal == 0)
        xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.Purchasecost3_1" ).validate.nullTest = "disabled";
      else
         xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.Purchasecost3_1" ).validate.nullTest = "error";
    For the onClick event :
    var a = xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row2.CostItemRecovere d_OnlyEnergyCharges").rawValue;
    //app.alert(a);
    if(a == 0)
        xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.ComplianceCheck_ L1_1").validate.nullTest = "error";
      if(a == 1)
          xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.ComplianceCheck_ L1_1").validate.nullTest = "disabled";
       Please help someone !!!

    I used the onchange event and wrote the code for it. I got the result . But there is a problem.All these fields are in a table and it's a dynamic table where you can add rows dynamically at the run time .I have other change event for some fields in this table .All are working fine when i add the row.But for this check box the required fields are not validated as required at the run time . I am here giving the code , Please help me .
    form1.Subform0.Subform1.Subform9.Subform10.Table48.Row2.CostItemRecovered_OnlyEnergyCharge s::change - (JavaScript, client)
    if(this.rawValue == "1")
      xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.ComplianceCheck_ L1_1").mandatory= "error";
      xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.ComplianceCheck_ L2_1").mandatory= "error";
      xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row5.ComplianceCheck_ L1_2").mandatory= "error";
      xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row5.ComplianceCheck_ L2_2").mandatory= "error";
      xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row6.ComplianceCheck_ L1_3").mandatory= "error";
      xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row6.ComplianceCheck_ L2_3").mandatory= "error";
      xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row7.ComplianceCheck_ L1_4").mandatory= "error";
      xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row7.ComplianceCheck_ L2_4").mandatory= "error";
      xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row8.ComplianceCheck_ L1_5").mandatory= "error";
      xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row8.ComplianceCheck_ L2_5").mandatory= "error";
    else
    xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.ComplianceCheck_ L1_1").mandator = "disabled";
    xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.ComplianceCheck_ L2_1").mandatory = "disabled";
    xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row5.ComplianceCheck_ L1_2").mandatory = "disabled";
    xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row5.ComplianceCheck_ L2_2").mandatory = "disabled";
    xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row6.ComplianceCheck_ L1_3").mandatory = "disabled";
    xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row6.ComplianceCheck_ L2_3").mandatory = "disabled";
    xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row7.ComplianceCheck_ L1_4").mandatory = "disabled";
    xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row7.ComplianceCheck_ L2_4").mandatory = "disabled";
    xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row8.ComplianceCheck_ L1_5").mandatory = "disabled";
    xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row8.ComplianceCheck_ L2_5").mandatory = "disabled";

  • How to disable the run-time popup menu in the sequence display on TestStand Operator Interface, that allow the use to skip the test?

    How to disable the run-time popup menu in the sequence display on TestStand Operator Interface, that allow the use to skip the test?

    Hello,
                  Regarding the skip/force pass/force fail options, when I set the ControlExecFlow to True in Teststand 3.1 and 3.5, in the Sequence Editor the menu options for skip/force pass/force fail are not active for Technician but, when I launch the Operator Interface logged with Technician the options are active. The problem is that if the technician sets one step to one of these options, and change the user to Operator, the test step remains skip/force pass.
                  Is there any possibility without modifying the Operator Interface (at programming level), to reload default values of the steps when changing the user to Operator?
    Thank you,
    Best regards,
    paio

Maybe you are looking for