Question
Form not posting
The page shows a listing of items from the database. I have
four very short (one field) forms that make up the search routine.
One lets you search by keyword. It posts to page A. One lets you
search by item owner. It posts to page B. Third lets you find all
items up for auction. It posts to page C. Fourth clears all
searches. It posts to page D. (this seperated answer was a solution
to some problem or other that I can't remember now, just know this
way fixed it.) All of this works, except that B doesn't post
correctly. When you click submit, processing goes to the correct
action page, but there are no form vars when you get there. Hence,
I get the error "Element xxx is undefined in FORM." When you scroll
down and look at the debug info there are the usual Scope
Variables, Client Variables, Cookie Variables, even Session
Variables, but there are NO form vars. Where did they go?? I am
using method=post. I have tried different field names. I have added
extra hidden fields with the thought that the server didn't want to
pay attention to just one single little field. I have added
"onclick='submit this.form'. I changed from input type="image" to
"submit". Nothing changes the fact that I get to the action page
but the form vars didn't come with me. Anyody got any ideas?
... blah blah blah ...
<!--- ------------------------ Search Forms Start Here ------------------------- --->
<table width="95%" align="center" class="listtext" border="0" Cellspacing="2">
<tr>
<td colspan="3" align="right">
<b>GO!</b><br>
</td>
</tr>
<!-- ------------------- A: Keyword Search ---------------------- -->
<form name="vehiclesearch" action="carlist_searcha.cfm" method="post">
<tr>
<td width="12%" class="listtitle" align="right" valign="top">
A.
</td>
<td width="*">
Enter a keyword to look for like a manufacturer's
name or a model. (uses an "AND" search)
</td>
<td width="37%" valign="bottom" align="right" class="listtitle">
Keyword <img src="../images/1x1.gif" width="50" height="5"><br>
<input type="text" name="kword" size="20" >
<input type="image" src="../images/purparrow.gif" ><br>
</td>
</tr>
</form>
<!-- ------------------- B: Owner Search ------------------------ -->
<CFform name="vehiclesearch" action="carlist_searchb.cfm" method="post">
<tr>
<td class="listtitle" align="right" valign="top">
B.
</td>
<td>
<b>OR</b> enter an owner's name to find all the vehicles belonging
to a particular person.
</td>
<td class="listtitle" align="right">
Owner Name <img src="../images/1x1.gif" width="50" height="5"><br>
<CFinput type="text" name="owname" size="20" >
<CFinput type="hidden" name="blank1" value="nothing">
<CFinput type="hidden" name="blank2" value="nadda">
<input type="image" src="../images/purparrow.gif" onClick="this.form.submit()"><br>
</td>
</tr>
</CFform>
<!-- ------------------ C: Select ebay listings -------------------- -->
<form name="vehiclesearch" action="carlist_searchc.cfm" method="post">
<tr>
<td class="listtitle" align="right" valign="top">
C.
</td>
<td>
<b>OR</b> check here to show only the vehicles currently listed on ebay.
</td>
<td class="listtitle" align="right">
Ebay <img src="../images/1x1.gif" width="50" height="5"><br>
<input type="checkbox" name="ebay">
<img src="../images/1x1.gif" width="10" height="1">
<input type="image" src="../images/purparrow.gif" ><br>
</td>
</tr>
</form>
<!-- ----------------- 😧 Clear all searches and sorts ------------ -->
<form name="vehiclesearch" action="carlist_searchd.cfm" method="post">
<tr>
<td class="listtitle" align="right" >
D.
</td>
<td>
Clear all searches and browse all cars.
</td>
<td align="right">
<input type="hidden" name="clearflag" value="yes">
<input type="submit" value="Clear">
</td>
</tr>
</form>
</table>
<br>
<!--- ------------------------------ End search forms --------------------------- --->
<!-- ------------------------ Column Titles and Sort Links ----------------------- -->
<table align="center" width="98%" border="0" cellpadding="0" cellspacing="0">
... blah blah blah list stuff here ...
... blah blah blah ...
<!--- ------------------------ Search Forms Start Here ------------------------- --->
<table width="95%" align="center" class="listtext" border="0" Cellspacing="2">
<tr>
<td colspan="3" align="right">
<b>GO!</b><br>
</td>
</tr>
<!-- ------------------- A: Keyword Search ---------------------- -->
<form name="vehiclesearch" action="carlist_searcha.cfm" method="post">
<tr>
<td width="12%" class="listtitle" align="right" valign="top">
A.
</td>
<td width="*">
Enter a keyword to look for like a manufacturer's
name or a model. (uses an "AND" search)
</td>
<td width="37%" valign="bottom" align="right" class="listtitle">
Keyword <img src="../images/1x1.gif" width="50" height="5"><br>
<input type="text" name="kword" size="20" >
<input type="image" src="../images/purparrow.gif" ><br>
</td>
</tr>
</form>
<!-- ------------------- B: Owner Search ------------------------ -->
<CFform name="vehiclesearch" action="carlist_searchb.cfm" method="post">
<tr>
<td class="listtitle" align="right" valign="top">
B.
</td>
<td>
<b>OR</b> enter an owner's name to find all the vehicles belonging
to a particular person.
</td>
<td class="listtitle" align="right">
Owner Name <img src="../images/1x1.gif" width="50" height="5"><br>
<CFinput type="text" name="owname" size="20" >
<CFinput type="hidden" name="blank1" value="nothing">
<CFinput type="hidden" name="blank2" value="nadda">
<input type="image" src="../images/purparrow.gif" onClick="this.form.submit()"><br>
</td>
</tr>
</CFform>
<!-- ------------------ C: Select ebay listings -------------------- -->
<form name="vehiclesearch" action="carlist_searchc.cfm" method="post">
<tr>
<td class="listtitle" align="right" valign="top">
C.
</td>
<td>
<b>OR</b> check here to show only the vehicles currently listed on ebay.
</td>
<td class="listtitle" align="right">
Ebay <img src="../images/1x1.gif" width="50" height="5"><br>
<input type="checkbox" name="ebay">
<img src="../images/1x1.gif" width="10" height="1">
<input type="image" src="../images/purparrow.gif" ><br>
</td>
</tr>
</form>
<!-- ----------------- 😧 Clear all searches and sorts ------------ -->
<form name="vehiclesearch" action="carlist_searchd.cfm" method="post">
<tr>
<td class="listtitle" align="right" >
D.
</td>
<td>
Clear all searches and browse all cars.
</td>
<td align="right">
<input type="hidden" name="clearflag" value="yes">
<input type="submit" value="Clear">
</td>
</tr>
</form>
</table>
<br>
<!--- ------------------------------ End search forms --------------------------- --->
<!-- ------------------------ Column Titles and Sort Links ----------------------- -->
<table align="center" width="98%" border="0" cellpadding="0" cellspacing="0">
... blah blah blah list stuff here ...
