|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
passing hidden values alomg with the selected value in list box
Hi All
I need to pass few hidden values for the selected value from a list box. Whn try to pass the value I'm able to see the first value in the record, it is not looping through.Any help would be appreciated. \ See below the code which I am trying with. -------------------------------------------------------- <cfset counter = 1> <select name="quickref_field#counter#" style="width:250px;"> <cfoutput query="get_quickref"> <option value="#get_quickref.web_cont_url_txt#"> #get_quickref.web_cont_nm#</option> </cfoutput> </select> <cfoutput> <input type="hidden" name="v_webconturltxt#counter#" value="#get_quickref.web_cont_url_txt#"> <input type="hidden" name="v_webcontnm#counter#" value="#get_quickref.web_cont_nm#"> <input type="hidden" name="v_webcontid#counter#" value="#get_quickref.web_cont_id#"> <input type="hidden" name="v_webcontseqnbr#counter#" value="#get_quickref.web_cont_seq_nbr#"> <input type="button" class="formbutton1" name="Edit" value="Edit" onClick="javascript:formedit();"> </cfoutput> <cfset counter=counter+1> -------------------------------------------------------- Thanks. -s |
|
#2
|
||||
|
||||
|
Your counter increment is not in a loop, so it's not going to work. You'll just get one of each.
Try this: Code:
<cfoutput> <cfloop index="counter" start="1" end="#yourIndex#"> <select name="quickref_field#counter#" style="width:250px;"> <cfloop query="get_quickref"> <option value="#get_quickref.web_cont_url_txt#"> #get_quickref.web_cont_nm#</option> </cfloop> </select> <input type="hidden" name="v_webconturltxt#counter#" value="#get_quickref.web_cont_url_txt#"> <input type="hidden" name="v_webcontnm#counter#" value="#get_quickref.web_cont_nm#"> <input type="hidden" name="v_webcontid#counter#" value="#get_quickref.web_cont_id#"> <input type="hidden" name="v_webcontseqnbr#counter#" value="#get_quickref.web_cont_seq_nbr#"> <input type="button" class="formbutton1" name="Edit" value="Edit" onClick="javascript:formedit();"> </cfloop> </cfoutput> |
|
#3
|
|||
|
|||
|
No It doesn't work either.I'm getting two listboxes with the same value.....
and getting the first value as before.. Thanks -s |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > passing hidden values alomg with the selected value in list box |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|