D
Dan
Question on how to do this.
I'm trying to make a script that has 3 text fields in a form. When a
start time is entered in a text field in the form the other 2 fields
display the time with a set amount of hours and minutes added.
Example:
Text Box 1 - I enter Start Time
Text box 2 - Text Box 1 + 4 hrs 30 min.
Text box 3 - Text Box 1 + 9 hrs 30 min.
I started with this basic script but can't even get the time portion
to add correctly.
<SCRIPT LANGUAGE ="JavaScript">
function multiplyTheFields()
{
var number_one =window.document.the_form.field_one.value;
var number_two =window.document.the_form.field_two.value;
var product= number_one + '4:30';
window.document.the_form.timea.value = product;
}
</SCRIPT>
<Form name ="the_form">
<Input type = "text" name = "field_one" onchange =
"multiplyTheFields(); return false"><BR>
<Input type = "text" name = "field_two"><BR>
Answer <Input type = "text" name = "timea"><BR>
</FORM>
Thanks for any help, Dan
I'm trying to make a script that has 3 text fields in a form. When a
start time is entered in a text field in the form the other 2 fields
display the time with a set amount of hours and minutes added.
Example:
Text Box 1 - I enter Start Time
Text box 2 - Text Box 1 + 4 hrs 30 min.
Text box 3 - Text Box 1 + 9 hrs 30 min.
I started with this basic script but can't even get the time portion
to add correctly.
<SCRIPT LANGUAGE ="JavaScript">
function multiplyTheFields()
{
var number_one =window.document.the_form.field_one.value;
var number_two =window.document.the_form.field_two.value;
var product= number_one + '4:30';
window.document.the_form.timea.value = product;
}
</SCRIPT>
<Form name ="the_form">
<Input type = "text" name = "field_one" onchange =
"multiplyTheFields(); return false"><BR>
<Input type = "text" name = "field_two"><BR>
Answer <Input type = "text" name = "timea"><BR>
</FORM>
Thanks for any help, Dan