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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Button Value Text Problem

Status
Not open for further replies.

Lotruth

Programmer
May 2, 2001
133
US
<cfloop query=&quot;A&quot;>
<input type=&quot;Submit&quot; value=&quot;Delete ID#id#&quot; name=&quot;button&quot;>
</cfloop>

Shows up as...
[Delete ID1]
[Delete ID2]
[Delete ID3]

I have a loop that produces multiple delete buttons. The only difference between them is an id number. When the button is pressed the delete query deletes the record with an id equal to the id number at the end of the button. My problem is that I want to take the ids off of the buttons when they are displayed but I need to send them so that the query knows which id to delete. Is there a separate attribute for the submit type of input that allows you to send a value that will not show up on the button? Any help will be appreciated.
 
Use the NAME attribute and pass it through a Javascript funtion that tests the NAME value and proceeds from there. There's always a better way...
 
Thanks for your help. Im not too familiar with java. Could you post the could for that?
 
Try using 'id' within the HTML tag which won't display it on the button. ie: <INPUT name=&quot;button&quot; value=&quot;ID 1&quot; id=&quot;ID 1&quot;>. Or you can try invisible text areas to store the value for each button and pass it through when submitting.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top