richiebaby321
03-11-2005, 09:43 AM
Hello,
This is a ColdFusion related question, I hope that you guys out there can help me.
Here is a line of html taken from my form;
<input type="radio" name="radioButton#Counter#" value="add">
<input type="radio" name="radioButton#Counter#" value="del">
As you can see I have a radio button that is dynamically named; radioButton1, radioButton2, radioButton3,... and so on. They are grouped together so you can only select one button to select the values 'add' or 'delete'
That part works fine, I hit problems when I am processing the form after the submit.
I can successfully read the selected value by using the following code (remember it's ColdFusion!);
<cfoutput>You selected the #radioButton1# column</cfoutput>
and I receive "You selected the del column"
I would like to refer to the radio button dynamically because there are about 15 of them in a list, each allowing a delete or add for different items. But when I try the following, I receive a "Page cannot be displayed" error.
Idea 1) <cfoutput>You selected the #radioButton(var)# col</cfoutput>
Idea 2) <cfoutput>You selected the #radioButton[var]# col</cfoutput>
Idea 3) <cfoutput>You selected the #radioButton##var# col</cfoutput>
I'm sure that I've tried other variations but nothing seems to work when I replace the value with a variable.
Any ideas?
Rich.
This is a ColdFusion related question, I hope that you guys out there can help me.
Here is a line of html taken from my form;
<input type="radio" name="radioButton#Counter#" value="add">
<input type="radio" name="radioButton#Counter#" value="del">
As you can see I have a radio button that is dynamically named; radioButton1, radioButton2, radioButton3,... and so on. They are grouped together so you can only select one button to select the values 'add' or 'delete'
That part works fine, I hit problems when I am processing the form after the submit.
I can successfully read the selected value by using the following code (remember it's ColdFusion!);
<cfoutput>You selected the #radioButton1# column</cfoutput>
and I receive "You selected the del column"
I would like to refer to the radio button dynamically because there are about 15 of them in a list, each allowing a delete or add for different items. But when I try the following, I receive a "Page cannot be displayed" error.
Idea 1) <cfoutput>You selected the #radioButton(var)# col</cfoutput>
Idea 2) <cfoutput>You selected the #radioButton[var]# col</cfoutput>
Idea 3) <cfoutput>You selected the #radioButton##var# col</cfoutput>
I'm sure that I've tried other variations but nothing seems to work when I replace the value with a variable.
Any ideas?
Rich.