1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
|
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<script type="text/javascript">
function getText(val,object,where,param) {
dojo.byId(where).innerHTML = "<img src=\"<%=request.getContextPath()%>/public/images/ajax/wait0.gif\" alt=\"Veuillez patienter\" />";
dojo.xhrGet({
url: "<%request.getContextPath();%>ajax.do?val="+val+"&obj="+object+"¶m="+param,
load: function(response, ioArgs){
dojo.byId(where).innerHTML = response;
//Dojo recommends that you always return(response); to propagate
//the response to other callback handlers. Otherwise, the error
//callbacks may be called in the success case.
return response;
},
error: function(response, ioArgs){
dojo.byId(where).innerHTML =
"An error occurred, with response: " + response;
return response;
},
handleAs: "text"
});
}
</script>
<div class="formulaireVertical">
<h2>Information relatives à la localisation.</h2>
<html:form action="/processAddEtablissement">
<div class="content">
<div class='blocForm'>
<div id="corpForm">
<div id="form1">
<p>
<label for="provList" title="Choix de la province">Province : </label>
<html:select property="provList" onchange="getText(this.value,'getListDep','form2',null)">
<html:options collection="provinceList" property="codeProv" labelProperty="nomProv"/>
</html:select>
</p>
</div>
<div id="form2"></div>
<div id="form3"></div>
</div>
</div>
</div>
<div id="piedForm">
<html:submit value="pouet" />
</div>
</html:form>
</div> |
Partager