aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes How to get total count of selected Items of <Select> Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "How to get total count of selected Items of <Select>" Watch "How to get total count of selected Items of <Select>" New topic
Author

How to get total count of selected Items of <Select>

ravindra patil
Ranch Hand

Joined: Sep 01, 2006
Posts: 230
HI ,
How to get all index of selected items in multiselect box
<select name="s1" multiple>
<option value"1">one</option>
<option value"2">two</option>
<option value"3">three</option>
<option value"4">four</option></select>

suppose i am selecting all four iteam then how can i get index of all selected items??

selectedIndex retruns only first element selected...
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61413
    
  67

Iterate over the options looking for those with the selected attribute.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
ravindra patil
Ranch Hand

Joined: Sep 01, 2006
Posts: 230
thanks ...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to get total count of selected Items of <Select>