Click to See Complete Forum and Search --> : Javascript and HTML form query...


danb
02-04-2003, 07:00 AM
Just wondering if anyone could help me with this...

I have a standard HTML form with 'start date' and 'end date' fields. I need the end date field to be populated in real-time as a duplication of the 'start date'. The user may then alter the 'end date' if necessary, or leave it populated with the same data as the 'start date' field.

Bosses hey! Who'd 'ave 'em?

Any help would go down better than a thirsty Kelly Brook.

Thanks

gil davis
02-04-2003, 07:34 AM
<form ...>
<input type="text" name="startdate" onchange="if(this.form.enddate.value==""){this.form.enddate.value=this.value}">
<input type="text" name="enddate" value="">
</form>