samedi 27 juin 2015

JavaScript OnChange load another JSP page

I have a Jsp page on which there is a form form1 with a dropdownlist and I have included another Jsp page containing another form form2 to this page. I want that the form2 should be visible only when a particular element(say opt2) on the dropdownlist of form1 is selected.

Please see the code structure below:

<div id="somediv1">
    <%@ include file="../form2.jsp"%>
</div>
<form id="form1">
    <select  id="list1">
    <option>opt1</option>
    <option>Opt2</option>
    <option>opt3</option>
    <option>opt4</option>
    </select>

Aucun commentaire:

Enregistrer un commentaire