Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

<cfoutput query="GETlist"> <tr><t

Status
Not open for further replies.

shui

Programmer
May 26, 2001
1
US
I have the following code:

<cfoutput query=&quot;GETlist&quot;>
<tr><td>#description#</td><input type=&quot;hidden&quot; name=&quot;siteID&quot; value=&quot;#siteID#&quot;>
<td><<input type=&quot;Text&quot; name=&quot;username&quot; size=&quot;10&quot; maxlength=&quot;25&quot; value=&quot;#username#&quot;></td>
<td><input type=&quot;Text&quot; name=&quot;password&quot; size=&quot;10&quot; maxlength=&quot;25&quot; value=&quot;#password#&quot;></td>
<td><input type=&quot;Text&quot; name=&quot;adID&quot; size=&quot;10&quot; maxlength=&quot;50&quot; value=&quot;#adID#&quot;> <input type=&quot;Submit&quot; name=&quot;action&quot; value=&quot;submit&quot;></td>
</tr>
</cfoutput>

Let us say that the query yields six rows of result. The codes output a submit button at the end of each row. As it is, any of the six buttons act on inputs from all the six rows. I want each button to act on only the row connected to it. How can I achieve that?
Thanks
 
The easiest and best way to do that would be to put a <form> tag in each output:

<cfoutput query=&quot;GETlist&quot;>
<FORM NAME=&quot;myForm&quot; ACTION=&quot;test.cfm&quot;>
<tr>
<td>#description#</td><input type=&quot;hidden&quot; name=&quot;siteID&quot; value=&quot;#siteID#&quot;>
<td><<input type=&quot;Text&quot; name=&quot;username&quot; size=&quot;10&quot; maxlength=&quot;25&quot; value=&quot;#username#&quot;></td>
<td><input type=&quot;Text&quot; name=&quot;password&quot; size=&quot;10&quot; maxlength=&quot;25&quot; value=&quot;#password#&quot;></td>
<td><input type=&quot;Text&quot; name=&quot;adID&quot; size=&quot;10&quot; maxlength=&quot;50&quot; value=&quot;#adID#&quot;> <input type=&quot;Submit&quot; name=&quot;action&quot; value=&quot;submit&quot;></td>
</tr>
</FORM>
</cfoutput>

- tleish
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top