By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,516 Members | 1,178 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,516 IT Pros & Developers. It's quick & easy.


P: 15

Can somebody advise if I can / how to do something like this:

getNodeValue.....add this to something.....than set added value to the Node.

Basically, the CityName displays correctly (onclick update). I have a value stored in the CityTime that equals the difference in hours between GMT/UTC and the time for the city (e.g. Frankfurt = 1).

How do I add this to a UTCString to get the actual value and than return this to the Node? Is it possible?

Ive tried many different functions but can't get any positive results. Can this be done? Do I need to change my approach?

Expand|Select|Wrap|Line Numbers
  1. function showCityInfo(form)
  2. {
  3. var cIndex = -1; // Selected city
  4. cIndex = form.selCityList.selectedIndex;
  6. // Update city info fields with selected city data
  7. setNodeValue("CityName", cityData[cIndex].name);
  8. setNodeValue("CityTime", cityData[cIndex].time);
  10. }  
Oct 9 '07 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 15k+
P: 16,027
Use the Date object's setUTC* methods.
Oct 10 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.