Difficulty with multiple <form>s
Posted: Thu Jul 24, 2008 8:16 am
~pickle | Please use [ code=html ], [ code=php ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:
Posting Code in the Forums to learn how to do it too.
So I'm working on this search function for a status page I've made. Basically it uses a little javascript to have the user select their input from a popup calendar. Not too difficult really, and not my problem. Once implimented however, I don't have a good way to submit the data in the fields they fill out because both fields require a <form> tag to complete their action, and because of this, I can't seem to put a <form> tag completely around the two statements so that I can then post the information with a submit button, once I put the <form> tag before the first javascript popup, it stops working and I have nothing to submit. The javascript looks like this (this is without the script commands in the header):
So you can see that it starts with a form and then does a lot of javascript ten closes the form and then moves to the next object. What I need to do is somehow get both of those inputs tied to a submit button that would basically be where this code ends. If anyone has any tricks or ideas, I'd appreciate the input.
If any clarification is needed, I can provide some, I'm always bad at explaining my problem well, haha.
~pickle | Please use [ code=html ], [ code=php ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:
Posting Code in the Forums to learn how to do it too.
So I'm working on this search function for a status page I've made. Basically it uses a little javascript to have the user select their input from a popup calendar. Not too difficult really, and not my problem. Once implimented however, I don't have a good way to submit the data in the fields they fill out because both fields require a <form> tag to complete their action, and because of this, I can't seem to put a <form> tag completely around the two statements so that I can then post the information with a submit button, once I put the <form> tag before the first javascript popup, it stops working and I have nothing to submit. The javascript looks like this (this is without the script commands in the header):
Code: Select all
<td>Start Date :</td>
<td>
<FORM NAME="start">
<INPUT TYPE="text" NAME="date1" VALUE="" SIZE=25>
<A HREF="#"
onClick="cal.select(document.forms['start'].date1,'anchor1','MM/dd/yyyy'); return false;"
NAME="anchor1" ID="anchor1">Select</A>
</FORM></td>
<td>End Date :</td>
<td>
<FORM NAME="end">
<INPUT TYPE="text" NAME="date1" VALUE="" SIZE=25>
<A HREF="#"
onClick="cal.select(document.forms['end'].date1,'anchor1','MM/dd/yyyy'); return false;"
NAME="anchor1" ID="anchor1">Select</A>
</FORM></td>
If any clarification is needed, I can provide some, I'm always bad at explaining my problem well, haha.
~pickle | Please use [ code=html ], [ code=php ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: