Solved

disable options in multiselect

Posted on 2009-04-05
5
964 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 49

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Run the project 5 87
lessBy10  challenge 15 92
How to set default webapp for host 6 45
difference between projection and projection list in hibernate 1 101
Often, people trade privacy and security for convenience. However in today's concrete jungle, this is an extremely foolish decision considering the vast amount of technologies being used against consumer interest. First off, I won't waste any time e…
Fine Tune your automatic Updates for Ubuntu / Debian
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

914 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now