Salesmen fill out this form I created and frequently enter a date for a particular option without checking the option. If they fill in the date without checking the checkbox, is there a way to auto-check it?
I assumed the onKeyPress event was the best choice. For the date- I am using Popup Calendar.
...
I thought it would piece together something like the above.
Any thoughts?
I assumed the onKeyPress event was the best choice. For the date- I am using Popup Calendar.
...
Code:
<html><body>
<script language = "javascript">
<!--
function autoCheck( )
{
if ( drf.Sample.checked == false
&& drf.SampleDate.value.length !=0 )
{
//drf.Sample.checked == true;
}
}
//-->
</script>
<form name = "drf">
SAMPLE: <input type = "checkbox" name = "Sample" value = "X"> <BR><BR>
DATE: <input type = "textbox" name = "SampleDate" onKeyPress = "autoCheck( );">
</form></body></html>
I thought it would piece together something like the above.
Any thoughts?