• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem in Multiple Select of drop down

 
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all,
i have a multiple select drop down
which has the following values
1.All (Users)
2.User1
3.User2
4.User3
now what i want to do is when i select "All" then the other values i.e
a.User1,User2,User3,should automatically get selected.
b.If i select All and then any other User then i should show the user that u have selected All already,so cant select other users
Plz reply soon,me in trouble.
Thanx in Advance.
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For the record, there is no HTML multi-select drop-down. There is only the multi-select list box. If you are getting the "drop-down" functionality in a select, then it isn't multi-select.
As for the "All" option, you will have to put an onChange() event handler in your <SELECT> tag. This event will be fired when the user selects/deselects an option in your list box. From there you will have to write some logic to determine if "All" has been selected or if it was already selected. If it was chosen then you can force the selection of all the available options. If it was already selected and the user chooses something else, you can then return false from your function, cancelling the change event.
 
Ranch Hand
Posts: 449
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check and customize this as per your needs
http://www.geocities.com/rathorev/TestDrop.html
 
mahadevan raja
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanx vijay rathore,
the link u gave me was very useful,thanx a lot again,u solved my problem.
 
There will be plenty of time to discuss your objections when and if you return. The cargo is this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic