www.webdeveloper.com
Recent Articles
  • Finding Slow Running Queries in ASE 15
  • A More Advanced Pie Chart for Analysis Services Data
  • Adobe AIR Programming Unleashed: Working with Windows
  • Performance Testing SQL Server 2008's Change Data Capture Functionality
  • The ABC's of PHP: Introduction to PHP
  • How to Migrate from BasicFiles to SecureFiles Storage
  • Why the Twitter Haters Are Wrong
  • User Personalization with PHP: Beginning the Application
  • Whats in an Oracle Schema?
  • Lighting Enhancement in Photoshop
  •  

    Go Back   WebDeveloper.com > Client-Side Development > JavaScript

    JavaScript JavaScript (not Java) Discussion and technical support, including AJAX and frameworks (JQuery, MooTools, Prototype...)

    Reply
     
    Thread Tools Search this Thread Rate Thread Display Modes
      #1  
    Old 03-05-2007, 08:10 AM
    rorysmom rorysmom is offline
    Registered User
     
    Join Date: Jan 2007
    Posts: 6
    Limit users to pick one selection from list box

    Hello. I have two list boxes on a front-end client dashboard. The selections in the list boxes are populated using a hidden query on start-up. We need to allow users to pick one selection, and from only one listbox.

    The list box names are lb_acct num and lb_group_name. So the client could make one selection in lb_acct num, but then lb_group_name must be unavailable for selection. OR the client can select one item from lb_group_name, but then lb_acct num becomes unavailable.

    I know there is functionality in JavaScript where you can set 'select-multiple' settings vs. 'select-one'. I would need to use the select-one functionality. Trouble is, I'm new to JS and have never used the functionality before.

    If anyone can offer some assistance, it is greatly appreciated!
    Reply With Quote
      #2  
    Old 03-05-2007, 09:57 AM
    mrhoo mrhoo is offline
    Registered User
     
    Join Date: Feb 2006
    Posts: 2,560
    <select size="1" name="select_1">


    Set each select element's onchange handler to disable the other.

    Or (friendlier) let the last one selected (onchange) pass it's value to a hidden field. Last one selected wins.

    Last edited by mrhoo; 03-05-2007 at 10:05 AM.
    Reply With Quote
    Reply

    Bookmarks


    Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
     
    Thread Tools Search this Thread
    Search this Thread:

    Advanced Search
    Display Modes Rate This Thread
    Rate This Thread:

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is Off
    HTML code is Off
    Forum Jump


    All times are GMT -5. The time now is 12:58 PM.



    Acceptable Use Policy


    The Network for Technology Professionals

    Search:

    About Internet.com

    Legal Notices, Licensing, Permissions, Privacy Policy.
    Advertise | Newsletters | E-mail Offers

    Powered by vBulletin® Version 3.7.3
    Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.