Solved

disable options in multiselect

Posted on 2009-04-05
5
963 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
Comment Utility
>>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
Comment Utility
Thanks for your response ryancys. but  I have existing feature as mentioned above.
 
 
 
 
0
 
LVL 11

Accepted Solution

by:
Manish earned 500 total points
Comment Utility
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
Comment Utility
0
 

Author Closing Comment

by:prk_usa
Comment Utility
good
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

This article will show you how to create an ISO CD-ROM/DVD-ROM image (*.iso), and MD5 checksum signature, for use with VMware vSphere Hypervisor 6.5 (ESXi 6.5). It's a good idea to compare checksums, because many installations fail because of a corr…
Never store passwords in plain text or just their hash: it seems a no-brainier, but there are still plenty of people doing that. I present the why and how on this subject, offering my own real life solution that you can implement right away, bringin…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

771 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

10 Experts available now in Live!

Get 1:1 Help Now