I have this code that I wrote in cold fusion to do a timezone selection...
And I'd like to do the same thing in javascript... this seems like something that would be better for the client side to handle.. But Javascript is very different from the languages I use and I'm pretty lost on where to start (Where most languages use lcase(string).. javascript uses something to the effect of string.ToLowerCase().. and things like that... that's taking some getting used to).
What I want to do is populate a select box with times offsetting from current time.. offset starting at -7 ending at 17.
Any ideas?
ALFII.com
---------------------
If this post answered or helped to answer your question, please reply with such so that forum members with a similar question will know to use this advice.
Code:
The current time (US, Eastern Standard Time) is <font color="red">#dateformat(now(),"mm/dd/yy")#, #timeformat(now(),"hh:mm tt")#.<br><br>
<select name="timeOffset"><cfloop from="-7" to="17" index="moveTime">
<option value="#moveTime#">(#moveTime#:00) #dateformat(DateAdd("h",moveTime,Now()),"m/d")# at #timeformat(DateAdd("h",moveTime,Now()),"h:mm tt")#</option></cfloop>
</select>
And I'd like to do the same thing in javascript... this seems like something that would be better for the client side to handle.. But Javascript is very different from the languages I use and I'm pretty lost on where to start (Where most languages use lcase(string).. javascript uses something to the effect of string.ToLowerCase().. and things like that... that's taking some getting used to).
What I want to do is populate a select box with times offsetting from current time.. offset starting at -7 ending at 17.
Any ideas?
ALFII.com
---------------------
If this post answered or helped to answer your question, please reply with such so that forum members with a similar question will know to use this advice.