I have a Data Entry Form. With many Data Entry fields. I'm using Javascript in two ways. (1) to Validate Data and (2) to manipulate the Form,
I have two fields that relate to each other. I have a drop down box that contains values of 0 thru 24, If user selects anything greater then zero, I use the following code to open up a number of text boxes ( used to enter dates ) the user requested :
var txtbox = document.createElement("input");
txtbox.type = "text";
txtbox.name = "sqDate" + (cellCnt - 1);
txtbox.id = "sqDate" + (cellCnt - 1);
txtbox.value = "mm/dd/ccyy";
cell1.appendChild(txtbox);
In my form (
jsp) I have created an empty table <table id="sQmTable" cellspacing="0" border="0" > </table> So the text boxes are created inside this table. This works just the way I want it, but how do I know when the user enters data so I can validate it ? Where would I check for this event ? Would I use "onchange" ? Etc. ?
Thanks for any help