DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Nelson Petracek Guest

    HTML select control not displaying options properly.


    I have a HTML select control with size of 1 (essentially a drop down list
    box) that I dynamically add options to using JavaScript. The options are
    added to the select control when the user clicks the arrow button to expand
    the list. The options are added properly, but the list does not seem to
    know that it has a number of options at this point. It will drop down the
    list, but only one option is shown...vertical scrollbars appear and the user
    has to scroll through the list. If I click on the control again, then the
    list expands to show 5 or 6 options.

    Is there a way I can get the list to display more than one option in this
    scenario? Maybe I need to preset the size of the drop down list (e.g. size
    it to 5 or 6 options, even if fewer exist)? I am viewing the list using
    IE5/5.5.

    Thanks!

  2. #2
    Lisa Guest

    Re: HTML select control not displaying options properly.


    Nelson:
    If I read this correctly - that the options are added when the user clicks
    on the list - ie in the on_click event for the list....then I would suggest
    its more of there not being enough time to get the list populated before
    you view it. Therefore the items exist the second time you visit the control.

    Good luck
    Lisa


    "Nelson Petracek" <prgcmptsoln@home.com> wrote:
    >
    >I have a HTML select control with size of 1 (essentially a drop down list
    >box) that I dynamically add options to using JavaScript. The options are
    >added to the select control when the user clicks the arrow button to expand
    >the list. The options are added properly, but the list does not seem to
    >know that it has a number of options at this point. It will drop down the
    >list, but only one option is shown...vertical scrollbars appear and the

    user
    >has to scroll through the list. If I click on the control again, then the
    >list expands to show 5 or 6 options.
    >
    >Is there a way I can get the list to display more than one option in this
    >scenario? Maybe I need to preset the size of the drop down list (e.g. size
    >it to 5 or 6 options, even if fewer exist)? I am viewing the list using
    >IE5/5.5.
    >
    >Thanks!



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links