0
<s:doubleselect id="idCourseId" doubleId="idClassId" name="strCourseMasterId" 
            doubleName="strCourseChildId" 
            list="lstCourseMasterModels" doubleList="lstCourseChildModels" listKey="lngCourseId" 
            doubleListKey="lngCourseChildId" listValue="strCourseName" doubleListValue="strClassName"
            label="Course & Class"></s:doubleselect>

I need to get the listValue and ListKey of the selected Item in the doubleSelect..??

Is it possible to get the values from JSP using Javascript.??

Dileep
  • 5,362
  • 3
  • 22
  • 38
  • `JSP` is executed server-side and `Javascript` is a client-side language so what you see on the browser is plain HTML and Javascript interacts with HTML. `JSP` on the otherhand generates this HTML and ` – Prakash K Jun 06 '13 at 12:37
  • @PrakashK Actually we can grab the value that is selected from the double select using document.getElementById("idClassId").value like wise is it possible to find the value from the ListValue. The text that is displayed on the Display. I need Both the text displayed in the Page and the corresponding key value. – Dileep Jun 07 '13 at 05:07
  • `document.getElementById("idClassId")` this is grabbing the value from the rendered HTML (which was generated from the JSP dynamically) and not from the `JSP`, I hope you understand the difference. Javascript runs on the browser and not on the Server as you might think. You might have been firing the javascript function onpage load and hence you are thinking it is happening from the server side. [Here is the link](http://stackoverflow.com/questions/5913/getting-the-text-from-a-drop-down-box) which would be helpful to get the text/label as well as the value of the selected option. – Prakash K Jun 07 '13 at 06:20

0 Answers0