Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 983
  • Last Modified:

disable options in multiselect

Hi All,
I have a multiselect drop down . At first users lets think it is "new" mode users will submit this multiselect drop down and value/values will be stored in database( I have 5 values in drop down)
now in "update" mode again users will try to submit by selecting more values from this multiselect drop down, but I want to stop and show them a alert as soon as submit all the values in the drop down , i.e out of 5 they can select upto 4 , but if they select the 5th one ,I should leave the values which came from database and I should deselect recently selected values.
 I hope I am clear.
Thanks in adavance.
0
prk_usa
Asked:
prk_usa
  • 2
  • 2
1 Solution
 
Ryan ChongCommented:
>>i.e out of 5 they can select upto 4 , but if they select the 5th one ,I should leave the values which came from database and I should deselect recently selected values.

Why not generate a checkboxes list instead? Which i think more user friendly and easier for your scripting?
0
 
prk_usaAuthor Commented:
Thanks for your response ryancys. but  I have existing feature as mentioned above.
 
 
 
 
0
 
ManishLeadCommented:
Iterate through selected values, check size and show alert.
ex.
http://www.ozzu.com/programming-forum/javascript-get-value-multiple-options-from-select-t88883.html
0
 
ManishLeadCommented:
0
 
prk_usaAuthor Commented:
good
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now