I have the following form (named TestForm.cfm):
<FORM ACTION="action_page.cfm" METHOD="post" NAME="theform">
Input name: <INPUT TYPE="text" NAME="name" VALUE="">
Input ID: <INPUT TYPE="text" NAME="ID" VALUE="">
<BR><BR>
<INPUT TYPE="button" NAME="Add_ID" VALUE="Add_ID" onClick="window.location='TestForm.cfm'">
<INPUT TYPE="submit" NAME="Submit_ID" VALUE="Submit">
</FORM>
This is to allow the user to enter a name and an ID. Here is the problem. When the user enters a value in either of the text fields and then selects the "Add_ID" button, the text fields are cleared. I want these values to remain after selecting this button. I can do this if the button was a submit button (and or, if the form was submitted in any way). But, I don't know how to do this if all I am doing is redrawing the form. And that is the key. I need this to work without submitting the form.
Any ideas? Is it impossible?
<FORM ACTION="action_page.cfm" METHOD="post" NAME="theform">
Input name: <INPUT TYPE="text" NAME="name" VALUE="">
Input ID: <INPUT TYPE="text" NAME="ID" VALUE="">
<BR><BR>
<INPUT TYPE="button" NAME="Add_ID" VALUE="Add_ID" onClick="window.location='TestForm.cfm'">
<INPUT TYPE="submit" NAME="Submit_ID" VALUE="Submit">
</FORM>
This is to allow the user to enter a name and an ID. Here is the problem. When the user enters a value in either of the text fields and then selects the "Add_ID" button, the text fields are cleared. I want these values to remain after selecting this button. I can do this if the button was a submit button (and or, if the form was submitted in any way). But, I don't know how to do this if all I am doing is redrawing the form. And that is the key. I need this to work without submitting the form.
Any ideas? Is it impossible?