Solved

disable options in multiselect

Posted on 2009-04-05
5
965 Views
Last Modified: 2012-05-06
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
Comment
Question by:prk_usa
  • 2
  • 2
5 Comments
 
LVL 50

Expert Comment

by:Ryan Chong
ID: 24074127
>>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
 

Author Comment

by:prk_usa
ID: 24074174
Thanks for your response ryancys. but  I have existing feature as mentioned above.
 
 
 
 
0
 
LVL 11

Accepted Solution

by:
Manish earned 500 total points
ID: 24075784
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
 
LVL 11

Expert Comment

by:Manish
ID: 24075839
0
 

Author Closing Comment

by:prk_usa
ID: 33056268
good
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
maven project import to eclipse problems 13 105
unit test DAO layer 1 137
lessBy10  challenge 15 95
IE doesn't Invoke servlet in iframe 1 111
One of the biggest threats in the cyber realm pertains to advanced persistent threats (APTs). This paper is a compare and contrast of Russian and Chinese APT's.
How do we balance the user experience (UX) with reasonable security measures? It can be done, if you keep these fundamentals in mind.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question