Limit the number of selections made from a Multiple select box.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • prometheus6001
    New Member
    • Nov 2008
    • 1

    #1

    Limit the number of selections made from a Multiple select box.

    I need someone to put me through something. I have a multiple select list box with more than 5 entries but I want it in such a way that the user may only select 3 out of the list.

    Please who can help me with that?
  • gits
    Recognized Expert Moderator Expert
    • May 2007
    • 5390

    #2
    you cannot achieve that with html/ccs only ... you could use JavaScript for that ... in case you want to ;)

    kind regards

    Comment

    • serdar
      New Member
      • Nov 2008
      • 88

      #3
      You should validate the user input with a serverside script (php, asp, jsp etc.). A javascript-only validation is not secure, user can simply ignore it by turning off javascript. So the correct way is to implement a validation on the serverside and add javascript on top of it.

      Comment

      Working...