any reason you are puttting all these into hidden form values? Why not
just build and associative array and use that to lookuop the rating it
will save bandwidth, it will be valid, and look more professional. The
lookup would be the same AsociativeArrayName[selectedValue] will give
you the rating.

Adam H 

On 6/14/05, Jeff Waris <[EMAIL PROTECTED]> wrote:
> Another question:
> 
> In my previous question.. I needed to grab the currently selected option
> from a select list.
> 
> I can now get the selected value using this code...
> 
> var SelOpt = document.myform.colors.options.selectedIndex;
> var colortype = document.myform.colors[SelOpt].value;
> 
> I now need to get the value of a hidden input that is dynamically named from
> the select list value...
> 
> Visusally it looks like this...
> 
> <select name="colors">
>         <cfloop query="color_names>
>         <option value="#name#">#name#</option>
>         <input type="hidden" name="#name#" value="#rating#">
>         </cfloop>
> 
> I am looking to get the RATING value.
> I can get the selected NAME using the code above, but my attempts to extract
> the hidden variable have been unsuccessful.
> 
> I've tried:
> 
> var amt = 'document.myform.' + colortype + '.value';
> and
> var amt = document.myform.colortype.value';
> 
> I'm stumped.. Any suggestions???
> 
> Thanks,
> Jeff
> 
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:209387
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to