The table had doubles and I did not bother to look. Thanks.


RO

-----Original Message-----
From: Philip Arnold [mailto:[EMAIL PROTECTED]
Sent: Monday, June 14, 2004 11:31 AM
To: CF-Talk
Subject: Re: drop-down list problem

On Mon, 14 Jun 2004 11:22:36 -0400, Robert Orlini wrote:
>
> I have a dynamic dropdown list that gets a statecode from a table and then compares to what is sent via form tag. It displays the state in the tag as selected along with other states that can be chosen in the dropdown. Its all OK, except it displays all the states twice. Any help with the code would be appreciated; here it is:
>
> <select size="1" name="State" size="20">
> <cfoutput query="getstates">
> <option value="#trim(statecode)#" <CFIF trim(statecode) EQ trim(form.state)>Selected</CFIF>>#left(trim(statename),15)#</option>
> </cfoutput>
> </select>

There's nothing in your code to indicate why you're getting doubles -
before you run this code, can you CFDUMP the getStates query to make
sure that it's not got the doubles within it?

Oh, and get rid of the double SIZE attribute in the SELECT - either
it's size 1 or it's size 20... which is it?
  _____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to