midou_gi
10-21-2009, 09:44 AM
In my jsp page i have a form in which i have a first combobox and i would after changing the value of an item that another combobox apears. So i used a proposition but it didn't work :(
<select name="sec" onchange="<c:set var="section" value="${param.sec}"/>">
<option id="option1">1</option>
<option id="option2">2</option>
<option id="option3">3</option>
</select>
<c:if test="${(section==3)}">
<select name="options">
....
</select>
</c:if>
Or to create a variable after the first combobox in which i put the first value selected without onchange function.
<c:set var="section" value="${param.sec}"/>
<c:if ....>
...
</c:if>
but the 2nd combobox appears after submitting.
So are there another solution using jsp commands or things like that (i tried with javascript but may be it s not good to use javascript and jsp at the same time)
<select name="sec" onchange="<c:set var="section" value="${param.sec}"/>">
<option id="option1">1</option>
<option id="option2">2</option>
<option id="option3">3</option>
</select>
<c:if test="${(section==3)}">
<select name="options">
....
</select>
</c:if>
Or to create a variable after the first combobox in which i put the first value selected without onchange function.
<c:set var="section" value="${param.sec}"/>
<c:if ....>
...
</c:if>
but the 2nd combobox appears after submitting.
So are there another solution using jsp commands or things like that (i tried with javascript but may be it s not good to use javascript and jsp at the same time)