• 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
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

How to getting the Multiple option from combobox

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

How to select the Multiple options from combo box, can u please send me the detailed code with alert messages. That means suppose if u select 3 option from that.

i want to disply 3 item names as a alert msg.

could you u please help me.

Thanking you
deva.
 
Ranch Hand
Posts: 256
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i think you use a list box for that. For multiple selections.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
for need to loop through the options and see if they are selected. Basic idea.

var obj = document.FormName.ElementName;
for(i=0;obj.options.length;i++){
if(obj.options[i].selected){
alert(obj.options[i].value);
}
}

Eric
reply
    Bookmark Topic Watch Topic
  • New Topic