This is a dropdownlist in which multiple values can be selected -- http://paste.ubuntu.com/7845559/ A loop has been used to create the options in the list accessing values from database.
This is the javascript function I am trying to use to read the multiple datas selected in the list -- http://paste.ubuntu.com/7845571/ I am not sure if the variable str in the javascript function is storing the values from dropdownlist. My questions are--
- How can I assign the javascript variable str to java string variable ?
- After doing 1 how can I send the java variable to a servlet ? I need to send this information to servlet to update infos in database.
- If this approach is wrong which one is a better way to access datas from the list and send them to servlet ? A simple code snippet will be very helpful.