How can we update the date&time without refreshing the page

Hi friends,
I have a jsp page. In that there is Date and Time. The date and time should be updated for every one minute without refresh the page(dynamically).
Its urgent for me
Thanks
Mallik

hello friend ru looking at date and time @ client side frm the server side if it is all about the client side date i don't think there is use of AJAX triggers and rendering the view by modifying the dom...
here is an example for you..
<%@ page language="java"%>
<HTML>
<HEAD>
<SCRIPT language="JavaScript">
function startclock()
var thetime=new Date();
var nhours=thetime.getHours();
var nmins=thetime.getMinutes();
var nsecn=thetime.getSeconds();
var nday=thetime.getDay();
var nmonth=thetime.getMonth();
var ntoday=thetime.getDate();
var nyear=thetime.getYear();
var AorP=" ";
if (nhours>=12)
    AorP="P.M.";
else
    AorP="A.M.";
if (nhours>=13)
    nhours-=12;
if (nhours==0)
   nhours=12;
if (nsecn<10)
nsecn="0"+nsecn;
if (nmins<10)
nmins="0"+nmins;
if (nday==0)
  nday="Sunday";
if (nday==1)
  nday="Monday";
if (nday==2)
  nday="Tuesday";
if (nday==3)
  nday="Wednesday";
if (nday==4)
  nday="Thursday";
if (nday==5)
  nday="Friday";
if (nday==6)
  nday="Saturday";
nmonth+=1;
if (nyear<=99)
  nyear= "19"+nyear;
if ((nyear>99) && (nyear<2000))
nyear+=1900;
this.document.getElementById("clockspot").innerHTML = "<b>"+nhours+": "+nmins+": "+nsecn+" "+AorP+" "+nday+", "+nmonth+"/"+ntoday+"/"+nyear+"</b>";
setTimeout('startclock()',1000);
</SCRIPT>
</HEAD>
<BODY>
<div id="clockspot"></div>
<SCRIPT language="JavaScript">
startclock();
</SCRIPT>
</BODY>
</HTML>hope this might help :)
REGARDS,
RaHuL

Similar Messages

  • HT4972 I have ipad version 4.3.2.  I have music on there that I want to keep.  when I go to itunes i cannot backup those music.  how can i update to ios 7 without losing the music?

    I have ipad version 4.3.2 and I want to update to ios7.  However, I cannot backup my musics on itune.  How can I update without losing my musics?

    Updating will not cause you to lose data but things can always go wrong. You should definitely backup before you update. I assume you have music on the device that was not purchased in iTunes and synced with a different iTunes library. You can transfer these songs back to your computer with third party software such as TouchCopy.

  • How can I reset my administrator password, without knowing the original administrator password?

    Hi guys,
    I use a MacBook Pro with OS X 10.8 Mountain Lion. A few months ago I reset my administrator password and have not been able to remember it since. Consequently, I haven’t been able to do any software updates, my computer is running slow and I'm getting a lot of pop-up junk on my screen. I’m the only user on my computer, apart from the Guest User (Sharing only).
    How can I reset my administrator password, without knowing the original password?
    Thanks.

    Resetting Password and/or Home Folder Permissions

  • How can I move columns in Numbers without distorting the formula in other cells?  In Excel I can cut and paste entire columns and the formula in other cells adjusts accordingly.  When I do it in Numbers, the formula messes up.  How can I do this?

    How can I move columns in Numbers without distorting the formula in other cells?  In Excel I can cut and paste entire columns and the formula in other cells adjusts accordingly.  When I do it in Numbers, the formula messes up.  How can I do this?
    For example: I have formulas in columns D and F that relate to columns C to CU
    If I want to move one column from one position to another (say S to T), the formula loses the colums that was moved, i.e. it doesn't recognize it has moved, rather sees it as deleted...  How can I do this without distorting the formula?

    Thanks for the feedback.
    If I often urge askers to look at the available resources, it's because  a large range of questions asked in the forums are already answered in these documents.
    As they are PDFs, they are easy to search in.
    CAUTION
    Download them while they are available.
    Given what is delivered with iBooks Author, I'm afraid that we will not get such easy to use documents.
    Searching infos in the  iBooks Author documentation available on line is awfully cumbersome and a lot of embedded links are wrongly flagged this way. In the Help files they aren't links but underlined strings.
    It seems that the tool used to generate the web pages was wrongly configured.
    Yvan KOENIG (VALLAURIS, France) dimanche 22 janvier 2012
    iMac 21”5, i7, 2.8 GHz, 12 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.2
    My Box account  is : http://www.box.com/s/00qnssoyeq2xvc22ra4k
    My iDisk is : http://public.me.com/koenigyvan

  • HT5654 how can i update my iphone use itunes on the computer

    how can i update my iphone use itunes on the computer

    How to update an iDevice  Scroll down to the section about updating via iTunes on the computer.

  • How Can I update my app new version to the registered devices

    Well, we have developed an in-house app using the Unity3d Game Engine. I'm using a Developer Enterprise account, and have already created the proper certificates, registered the devices (7 ipads) and generated the provisioning Profile. I have already clicked in the 'build an run', and the Unity Engine builds the app, that after is opened at the Xcode. I havel already fixed the bugs, and the app is working properly at the ipads.
    The problem is, I will need to Update the app, and I need to Update them without have to get them and build them at my own Mac, since they do not stay with me. I've been strugling with that for a while. I have downloaded the provisioning profile and sent by e-mail to one of the ipads, the one I'm using to test, and instaled it, but the version of my app have not been updated.
    I checked on my app icloud capabilities. The page about the Update of in-house apps is not very clear(http://help.apple.com/iosdeployment-apps/mac/1.1/#app43ad802c), and I'm new in the development for IOS.
    How can update my app at this Ipads? Is there any step-by-step to follow, more eplanatory that the link above?

    I didn't explained it correctly, I mean without getting the ipads, not the source code. I mean, at every time I need to launch a new version of the app, how can I update it through the internet, because I have installed my app running it at the ipads with the xcode, by usb. I'm using the enterprise program, so, as far as I know, the update is not through apple store.
    The ipads are in use, and I'd like to update them without have to get them to install it myself. Hope I have explained it better this time. Thank you for your help.

  • I upgraded from 3gs and want to use my old 3gs as an ipod. how can i update my new apple ID on the 3gs as it still shows a previous one that I had?

    I recently upgraded from 3Gs to Iphone4 and want to use my old 3Gs as an ipod. how can i update
    the user ID on the 3gs to a new one that I have as it is still showing a previous user ID?

    Settings>Store...tap the ID shown...sign out...sign back in with the ID you want to use.

  • How can i update iMessage and time

    How can I update iMessage and time

    Was iVideo purchased on the app store?  If so, both iPhoto and iVideo can be updated via the App Store.  (You can click on Software Update under the Apple menu at the top left of your display).

  • HT201303 How can I update my new credit details in the Apple ID?

    How can I update my new Credit card details in my existing Apple ID?

    Change Payment Information
    Settings>iTunes and App Stores>Apple ID>View Apple ID>Sign-in>Payment Information

  • How can i access a mysql table without putting the data in a datagrid

    I developed my air app with a datagrid which uses a php service to display all data from a table of strings in MySql.
    I now do not need the datagrid, how can i get the data from my database without putting it into a dataGrid? Do i need an array? how do i do this? anyone got any example code?

    Balakrishnan V wrote:
    var resultArrayCollection:ArrayCollection=new ArrayCollection()
    protected function resultHandler(event:ResultEvent)
         result=event.result as ArrayCollection
    You can use the result array collection now inside your program for any further changes / manipulations.
    Hope this helps; If you have further doubts, do ask...
    Balakrishnan V
    Hi, yeah this helps,
    however, how would i generate a result handler for a service that has not been called yet? Sorry my knowledge of services is very limited.
    This is a php service, get_all service that returns all the rows from a mysql table.
    I can see the service box with the service i want to use:
    but how do i pass that to a result handler?

  • How can I change database date/time(Sysdate) without changing OS date

    Hello all,
    I have a need to change the sysdate on a database for testing purposes and need to set the database date to a future date(ex. 6/30/2009). I have 2 other instances on the same server so changing the OS date is not an option. I'm familiar with setting the sysdate to a fixed value, but doing so changes the date to a constant because I still need the time to elapse. I've searched the forum and cannot find a way to do this. Any help would be greatly appreciated.
    Thanks,

    Write your own sysdate function in pl/sql and create public synonym.
    Sorry, It doesn't work.
    create public synonym sysdate from my_sysdate
    ERROR at line 1:
    ORA-00995: missing or invalid synonym identifierBartek
    Edited by: brtk on 2009-05-14 15:54

  • How can i look at earlier messages without hitting the load button a bunch of times??

    is there any way to view earlier messages from months ago without hitting the load button over and over to get to them??

    You need to turn on Photo Stream in iPhoto on your laptop to view the last 30 days of photos.
    The rest of your camera roll can't be viewed but can be restored when you get the device back.

  • Got Firefox Sync but lost my Key how can i get my data back without delete everything ?

    My computer was deleted, i don't have any others devices ? How can i get back my information.
    Apparently, there is no solution, this is shame. Why in my account i can't get back my key https://account.services.mozilla.com/ ? This service is useless if when we have a problem (all devices stolen for example) we can't get back any information...
    I'm really disappointed, and so are others people as far as i can see. I have to start from the beginning all my bookmarks, so i will use Chrome from now. Thanks a lot Mozilla.

    Sorry, but you're using Sync incorrectly if you don't have any other devices connected to that Sync account.
    Sync wasn't intended to be a "cloud" storage device; it's intended to be used to "synchronize" a user's across multiple devices. Upon completion of the initial setup of Sync procedure, the user is shown the Recovery Key and is told to make a copy of that "key". There are buttons in the dialog window to "save" to disk or to "print" the Recovery Key. Unfortunately, too many users just ignored that message (or ignored it) and put themselves in the same position that you are now in - lost data and no way to recover that data.
    The Sync / Recovery Key is used to encrypt your data as it is being uploaded to the Sync server and then used to decrypt your data when it is downloaded to one of your devices. Without the exact Sync Key that the user's data was encrypted with, the user's data is useless scrambled bunch of 1's and zero's.
    Firefox 29 has a new version of Sync that eliminates the need for the user knowing their Recovery Key. The method that generates that "key" uses the user account name (email address) and the user password, so in the future user's shouldn't find themselves in the same position that you are now in.
    ''IMO, Mozilla provided too much security by having that 3rd security "key" (the Recovery Key), considering how many user's aren't using Sync as it was intended to be used.''

  • How can I set up my time capsule as the primary base station with a centurylink router? I'm trying to extend my coverage, increase signal strength, and be able to connect a printer.

    I recently moved and now I'm trying to set up my Time Capsule as the primary base station or router with an existing network that has a Centurylink modem/router. The TC still has the settings for my old network. I also have backups on it. I have the data backed up to another HD so it's not an issue to return it to factory settings if doing so deletes the back ups. Do I need to restore it to the factory settings to set it up? Also, what settings would I select on the TC (and the Centurylink modem/router) in order for the TC to serve as the router, instead of the Centurylink router? I want to be able to use the TC to back up my Mac's, print wirelessly, and improve overall performance. I tried setting the TC up and ended with 2 different networks. Can anyone please help me with this?

    The TC has to plug into the existing modem router by ethernet.. you cannot use wireless.
    You have a choice of which is router.. only if Centurylink agree to bridge their modem router.. this has to be done by the ISP and often they do not allow it.
    Is your broadband cable or adsl or fibre or ???
    If it is cable and you are allowed to purchase your own cable modem pick a pure modem version with no router in it.. plug the TC into it by ethernet.
    Setup the TC in DHCP and NAT mode.. (depending on broadband type).
    You must reset the TC to factory to do the setup.. no files are lost at all.
    Here is my current recommended setup.. with Yosemite life has become harder than ever.
    Factory reset universal
    Power off the TC.. ie pull the power cord or power off at the wall.. wait 10sec.. hold in the reset button.. be gentle.. power on again still holding in reset.. and keep holding it in for another 10sec. You may need some help as it is hard to both hold in reset and apply power. It will show success by rapidly blinking the front led. Release the reset.. and wait a couple of min for the TC to reset and come back with factory settings. If the front LED doesn’t blink rapidly you missed it and simply try again. The reset is fairly fragile in these.. press it so you feel it just click and no more.. I have seen people bend the lever or even break it. I use a toothpick as tool.
    N.B. None of your files on the hard disk of the TC are deleted.. this simply clears out the router settings of the TC.
    Setup the TC again.
    ie Start from a factory reset. No files are lost on the hard disk doing this.
    Then redo the setup from the computer with Yosemite.
    1. Use very short names.. NOT APPLE RECOMMENDED names. No spaces and pure alphanumerics.
    eg TCgen5 and TCwifi for basestation and wireless respectively.
    Even better if the issue is more wireless use TC24ghz and TC5ghz with fixed channels as this also seems to help stop the nonsense. But this can be tried in the second round.
    2. Use all passwords that also comply but can be a bit longer. ie 8-20 characters mixed case and numbers.. no non-alphanumerics.
    3. Ensure the TC always takes the same IP address.. you will need to do this on the main router using dhcp reservation.. or a bit more complex setup using static IP in the TC. But this is important.. having IP drift all over the place when Yosemite cannot remember its own name for 5 min after a reboot makes for poor networking. If the TC is main router it will not be an issue.
    4. Check your share name on the computer is not changing.. make sure it also complies with the above.. short no spaces and pure alphanumeric.. but this change will mess up your TM backup.. so be prepared to do a new full backup. Sorry.. keep this one for second round if you want to avoid a new backup.
    5. Mount the TC disk in the computer manually.
    In Finder, Go, Connect to server from the top menu,
    Type in SMB://192.168.0.254 (or whatever the TC ip is which you have now made static. As a router by default it is 10.0.1.1 and I encourage people to stick with that unless you know what you are doing).
    You can use name.. SMB://TCgen5.local where you replace TCgen5 with your TC name.. local is the default domain of the TC and doesn't change.
    However names are not so easy as IP address.. nor as reliable. At least not in Yosemite they aren't. The domain can also be an issue if you are not plugged or wireless directly to the TC.
    6. Make sure IPv6 is set to link-local only in the computer. For example wireless open the network preferences, wireless and advanced / TCP/IP.. and fix the IPv6. to link-local only.
    There is a lot more jiggery pokery you can try but the above is a good start.. if you find it still unreliable.. don't be surprised.
    You might need to do some more work on the laptop itself. eg Reset the PRAM.. has helped some people. Clean install of the OS is also helpful if you upgrade installed.
    Tell us how you go.
    Someone posted a solution.. See this thread.
    Macbook can't find Time Capsule anymore
    Start from the bottom and work up.. I have a list of good network practice changes but I have avoided Yosemites bug heaven.
    This user has had success and a few others as well.
    RáNdÓm GéÉzÁ
    Here is why Yosemite has fundamental issues.
    http://arstechnica.com/apple/2015/01/why-dns-in-os-x-10-10-is-broken-and-what-yo u-can-do-to-fix-it/

  • How can I update contacts in iphone, without downloading email addy's?

    Is there a way for me to update my contacts on my iphone, without downloading a bunch of emails from my computer that I will never use through my phone?
    Thanks for any info!

    Do you mean, can you use the Contacts App without the e-mail App downloading e-mails at the same time?

Maybe you are looking for

  • Stop printing of jdk1.1.8 GUI

    Hi. Please see below code that i used to stop the user from printing my application. This however does not work i found out today. Please can someone give me any ideas on how else to solve this problem. Take note that I have to use jdk1.1.8. Thanks a

  • Progress Monitoring

    Hi all, I need to set up a ProgressMonitor so to display the progress on the main task of my program. this is pretty complex and goes beyond my program, involving others tools. How can i monitorate it? In the example which i saw, in the tutorial and

  • Will my pictures be deleted? iOS 7 update didn't work.  Now it's telling me to do a factory reset.

    I went to update my iPhone to the iOS7, and right after the backup part at the beginning, something happened and it said "An unknown error ocurred. Could not complete update" so my phone just stopped working and when I went to connect it to iTunes ag

  • When trying to download Acrobat Pro XI Student I only get this " http error: 404/support/downloads/dlm/main.jsp " warning.

    Hi! When trying to download Acrobat Pro XI Student I only get this " http error: 404/support/downloads/dlm/main.jsp " warning. This happens with Akamai and the altervative method too. I've paid it, is this because Adobe hasn't progressed my payment y

  • 3600 slide reboots when opening a file

    Dear all, I bought a Nokia 3600 slide in november, this is the *#0000# information: Nokia 3600 slide V 04.86 08-08-08 RM-352 (c) Nokia Variant: 00.00 Language: V 04.86 08-08-08 RM-352 (c) Nokia c when I open the file Gallery -> memory card -> cities