Displaying The Correct Time For World Cities With AJAX / JavaScript / DOM
Recently asked on Yahoo! Answers:
I’m working on JavaScript, and my assignment is to write a page that when you click on the radio button of a city and click update, it displays the time in the text box. however, its not working - can you help? (i’m on a library computer without admin privledges and without firefox so i can’t debug)
[code snipped]
I could have fixed the supplied code but it didn’t make use of certain efficiencies; additionally, I wanted to add some code that would increase the accuracy of the results — such as working from a single date object to compute all time, checking for Daylight Saving Time, etc.
So, without further ado, here’s the code. And, as always, the end of this post includes a link to a working demo, which you can save and use yourself.
Continue reading ‘Displaying The Correct Time For World Cities With AJAX / JavaScript / DOM’ »