hello, I have problem with JS and I'm hoping you will be able to help me. I built 2 steps script - in the first page the visitor choose the date he want to schedual his appoitment and his location: <select name='zone'> <option value='-4' selected> USA - EST</option> <option value='-7'>USA - PST</option> <option value='-5'>USA - CST</option> <option value='+8'>Austrlia - East Coast</option> </select> PHP: In the second page he need to choose the time he want for his appointment (the time is in GMT+3 -> my local time). in this page the script also get the time zone and the date that he choose in the previous page (using POST - PHP). the date saved in variable. I used unix time (MKTIME function) I want that every time my visitor choose time (from drop-down box) a new cell/DIV will appear with his local time. for example - when he choose date: 10 May 2010, time zone: Austrlia - East Coast (+8 Hours) and time 22:00, New DIV will appear with the date "11 May 2010, 03:00AM" (there are 5 hours different). what is the JS what caculate and show the visitor local time? (I have, in PHP, only his time zone and the date that he coose in the first page) Thanks in advance, Roi.
page 1: http://img294.imageshack.us/img294/3143/52372228.jpg page 2: http://img80.imageshack.us/img80/4932/50392586.jpg
I think you can send the user's time zone choice too in the URL and receive it using PHP Post method. Once you get it, I'm sure a simple Switch statement would serve your purpose. All the best!