• 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

Multiple selection in drop down list

 
Ranch Hand
Posts: 84
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I can select multiple values in listbox by using <html:select> & <html:optionCollections>/<html:options> tag. But I need to select multiple values from drop down list which means in the drop down list I should able to select multiple values(Becauze dont want multiple lines of listbox). If I use size="1" in <html:select> tag, i can achieve in single line. But it is not look good to select multiple values. I need to do this by using struts or html tag. I am being searched lot in net but did not get any solution. Please help how it can be achieved.

Thanks.
 
Ranch Hand
Posts: 349
Hibernate Eclipse IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try something like


Hope this helps
 
Rajagopal Mani
Ranch Hand
Posts: 84
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I need dropdown list instead of listbox. If attribute 'multiple' is used on <html:select> tag, it is converted as listbox not as dropdown list. If attribute 'multiple' is not used, the multiple value selection is not possible. I need to achieve both(*1)

*1
(1) Multiple value selection
(2) dropdown list instead of listbox

Please help to achieve the above.
 
Rancher
Posts: 377
Android Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey,

You will not be able to do this without the use of javascript as there is no such thing as a multiple selection drop down box in HTML.

Sean
 
Rajagopal Mani
Ranch Hand
Posts: 84
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Thanks for the information. Can you please provide any related link or sample code to achieve this.
 
Sean Clark
Rancher
Posts: 377
Android Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey,

if you use jQuery you can check this: http://code.google.com/p/dropdown-check-list/ otherwise you may just want to search about, a lot of people have asked this question but I couldn't really find any other helpful links.

Sean
 
Rajagopal Mani
Ranch Hand
Posts: 84
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Thanks for the reply. I too found this option during search. I thought to use this if nothing possible by html, javascript & struts. Hope this JQuery option will be pretty good.

Thanks
 
Sean Clark
Rancher
Posts: 377
Android Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
jQuery is JavaScript!
It is just a wrapper around it to make javascript simpler to use, more powerful with the least amount of effort.
See: http://jquery.com/ for more information.

Sean
 
Cob is sand, clay and sometimes straw. This tiny ad is made of cob:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic