jquery - Variable's value transfer from Jsp to Javascript -
i have dropdown of roles in jsp file. when role selected dropdown want selected role id. when role selected onchange
event occured , function 'callajax(roleid) triggered. here roleid jsp variable. trying pass through javascript. can not able this. possible? can 1 help me doing this. in advance.
<select name="role" onchange="callajax(roleid)"> <c:foreach items="${pro.roles}" var="rol" varstatus="status"> <option value="${rol.id}"> <c:out value="${rol.name}"/> </option> </c:foreach> </select>
i guess want utilize value contains id, alter this:
onchange="callajax(this.value)"
javascript jquery jsp
No comments:
Post a Comment