Expand|Select|Wrap|Line Numbers
- <%
- Dim MyTime : MyTime = FormatDateTime(now, 3) 'returns current date/time
- %>
- <tr>
- <td class="body" align="right"><strong>Select Time In:</strong></td>
- <td>
- <select name="customer_arrivaltime">
- <option selected="selected" value="<%=MyTime%>"><%=MyTime%></option>
- <option value="05:30:00 AM">5:30 AM</option> <option value="05:45:00 AM">5:45 AM</option>
- <option value="06:00:00 AM">6:00 AM</option> <option value="06:15:00 AM">6:15 AM</option>
- <option value="06:30:00 AM">6:30 AM</option> <option value="06:45:00 AM">6:45 AM</option>
- <option value="07:00:00 AM">7:00 AM</option> <option value="07:15:00 AM">7:15 AM</option>
- <option value="07:30:00 AM">7:30 AM</option> <option value="07:45:00 AM">7:45 AM</option>
- <option value="8:00:00 PM">8:00 PM</option>
- </select>
- </td>
- </tr>
So, I need to use the time on the users PC. It does not need to be atomically accurate, I don’t mind if the users PC has the wrong time. I have been playing with this javascript
Expand|Select|Wrap|Line Numbers
- <script type="text/javascript">
- var newtime;
- var d = new Date();
- newtime = d.toLocaleTimeString();
- document.write(newtime);
- </script>
can someone help? is there a better way to do this?
TIA
Path