Flash Games
 FAQ   Search   Memberlist   Usergroups   Register  Profile   Log in to check your private messages   Log in 


Get Selected Items from HTML Listbox



 

Post new topic   Reply to topic  
   DEVPPL Forum Index -> JavaScript Forum
View previous topic :: View next topic  
Author Message
sweoff



Joined: 18 Jan 2007
Posts: 1

PostPosted: Thu Jan 18, 2007 11:22 pm    Post subject: Get Selected Items from HTML Listbox Reply with quote

I'm trying to the selected items from a HTML list box and add them to a string and seperating them with an "~". Can help with this?
Back to top
View user's profile Send private message
Kevin1991



Joined: 19 Jan 2007
Posts: 4
Location: Malaysia

PostPosted: Mon Jan 22, 2007 9:22 am    Post subject: Re: Get Selected Items from HTML Listbox Reply with quote

<select id="myselect" onchange="AddToString()">
<option value="1">One</option>
<option value="2">Two</option>
</select>

Code:


var str = ""

function AddToString(){
str += myselect.value + "~"
}
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    DEVPPL Forum Index -> JavaScript Forum All times are GMT + 1 Hour
Page 1 of 1

 
 
Welcome to DEVPPL.com
You are not logged in, which means that you can't post in the forums.
Click here to Register

If you are a current member here on DEVPPL, please login below:

User: Pass:
Log me on automatically each visit:

 


Powered by phpBB © 2001, 2005 phpBB Group - Modified by DEVPPL

Flash Games - Sitemap