[thelist] Use client-side date and time in asp.net

Jeff Ervin jberv534 at verizon.net
Sun May 9 17:10:57 CDT 2004


I have seen references to using the client's date and time in an asp.net
page, but nothing complete.

Below is the code taken from an earlier archive:
<script>
function SetDateTime() {
	document.frmAddEditNewRequests.HiddenDateTime.value = new Date();
	// Change myForm to the name of your Form
}
</script>

In the form tag add:

	onSubmit="SetDateTime()"


In your form add:

	<input type="hidden" name="HiddenDateTime" value=""

I don't understand how to reference HiddenDateTime.

please help, if possible.

Thanks




More information about the thelist mailing list