954,585 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

drop down list issues

Ok what am I missing?? I have a dropdown list so that admin can select a value from and then update the database. The list IS populated but the select box isn't wide enough to see any of the option values. I even tried adding a size attribute. I know there is something simple I neglected, but I need some fresh eyes to spot the issue! Here is my query to populate:

<cfquery name="list" datasource="rlbulbs">
SELECT rlbbrand.brandName
FROM rlbbrand
</cfquery>


And here is my drop down list:

<tr>
      <td>Brand Name:</td>
      <td><select name="brandName">          
          <cfoutput query="list">
            <option value="#list.brandName#" selected="selected"></option>
          </cfoutput>
          </option>
        </select></td>
    </tr>


Thanks for any help in advance!

teedoff
Posting Pro
599 posts since Jul 2010
Reputation Points: 21
Solved Threads: 60
 

Unless there's a typo, you're not showing any text in the list ;-)

ie there should be something here I even tried adding a size attribute.

That applies to vertical size. ie Display x items (or rows). To set the width, use CSS and the "width" attribute. Select lists also have a "width" attribute too. But IIRC it's deprecated. http://www.blooberry.com/indexdot/html/topics/selectwidth.htm

arrgh
Posting Whiz
381 posts since Dec 2008
Reputation Points: 32
Solved Threads: 47
 

lol yes I figured that out as I was driving home! I knew it was something stupid! Thanks for the reply!

teedoff
Posting Pro
599 posts since Jul 2010
Reputation Points: 21
Solved Threads: 60
 

Taking your eyes and mind off the code for a little while always does the trick ;-)

arrgh
Posting Whiz
381 posts since Dec 2008
Reputation Points: 32
Solved Threads: 47
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You