> Thanks Justin, but I can't rely on JavaScript...
I don't have your original message handy, but another way may be to have
multiple hidden fields with the ID numbers associated with each submit
button. If the first button was pressed, the code would look for the value
of the first hidden field, etc.
So in the HTML...
<input type="hidden" name="id_1" value="x" />
<input type="hidden" name="id_2" value="y" />
<input type="hidden" name="id_3" value="z" />
<input type="submit" name="b_submit" value="button 1" />
<input type="submit" name="b_submit" value="button 2" />
<input type="submit" name="b_submit" value="button 3" />
.... And in the processing code...
<cfswitch expression="#form.b_submit#">
<cfcase value="button 1">
<cfset variables.use_id = form.id_1>
</cfcase>
<cfcase value="button 2">
<cfset variables.use_id = form.id_2>
</cfcase>
<cfcase value="button 3">
<cfset variables.use_id = form.id_3>
</cfcase>
</cfswitch>
In theory this would find the value of the button and assign the associated
ID to a local variable for use.
This method would rely on the text of the buttons never changing (or
requiring a code change as well) which I do not recommend. I would throw in
a default case as well in case one does change so you can at least send an
error notice to an admin or something to update the code to look for the new
value.
-Justin Scott
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:203154
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54