Yup. Use this notation:
document.myform[colortype].value;
From the looks of your code, the generated HTML will look something like
this:
select
optionasas/option
input type=hidden ... /
optionasasa/option
input type=hidden ... /
optionasasas/option
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.
my
question to formulate the answer I need. Hope that makes some sense..
Jeff
-Original Message-
From: Adam Haskell [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 14, 2005 9:29 AM
To: CF-Talk
Subject: Re: Quick OT Javascript question. PART 2
any reason you are puttting all
:[EMAIL PROTECTED]
Sent: Tuesday, June 14, 2005 9:18 AM
To: CF-Talk
Subject: RE: Quick OT Javascript question. PART 2
Yup. Use this notation:
document.myform[colortype].value;
From the looks of your code, the generated HTML will look
something like
this:
select
optionasas
This is prohibited by specs, a select element is not allowed to contain
a input element.
You might better use either a 2d array - var tmp [[0,1],[0,1]] or a
struct - var tmp {name:'value',name:'value'}
Micha Schopman
Project Manager
Modern Media, Databankweg 12 M, 3821 AL Amersfoort
Tel
5 matches
Mail list logo