<script language="JavaScript"> function calcTime(offset) { d = new Date(); utc = d.getTime() + (d.getTimezoneOffset() * 60000); nd = new Date(utc + (3600000*offset)); return "The local time is " + nd.toLocaleString(); } alert(calcTime('-8')); alert(calcTime('-7')); alert(calcTime('-6')); alert(calcTime('-5')); </script> 'In this I have 4 alerts to show timezone's time and date.and at every load of page it shows all 4 alerts... but i want to show the value of alerts in textbox with dropdown selection. i have 4 drop down values Pacific, Mountain, Central And Eastern timezone. I want to show result value in textbox on dropdown selection. Please help to solve this problem. '
Pseudocode.. you need to create a listener for your dropdown menu.. after that condition the selected value on what timezone it belongs.. get the value and display in textbox. :)