Bonjour la communauté, Je voudrais reporter la valeur d'un champs saisie dans un autre champs dans la page. Je veux utiliser onchange. ça ne marche pas. voici le code:
Code xml : Sélectionner tout - Visualiser dans une fenêtre à part
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 <?xml version="1.0" encoding="utf-8" ?> <jsp:root version="1.2" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ice="http://www.icesoft.com/icefaces/component"> <jsp:directive.page contentType="text/html;charset=utf-8" /> <script type="text/javascript"> function change() { document.getElementById('numOprFin').value = document.getElementById('numOprDeb').value; return true; } </script> <f:view> <ice:form id="form1"> <ice:panelCollapsible expanded="true"> <ice:panelGroup > <ice:outputText value="#{numberOp}" styleClass="inputTextR" /> <ice:inputText value="#{ExerciceBean.numOprDeb}" id="numOprDeb" partialSubmit="true" onchange="change();" /> <ice:inputText value="#{ExerciceBean.numOprFin}" id="numOprFin" partialSubmit="true" /> </ice:panelGroup> </ice:panelCollapsible> </ice:form> </f:view> </jsp:root>
Partager