Bonjour,
je ne connais pas javascript et pourtant j'ai du travail a faire dessus.
il s'agit de remplacer une zone dans une page html par le resultat d'une methode jsp...
si quelqu'un peut aider...
Voici ce que j'ai pu faire en faisant des copie-coller
Code : 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
 
<%@taglib uri="http://beehive.apache.org/netui/tags-template-1.0" prefix="netui-template"%>
<%@taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  <title>AMM project | Capgemini</title>
  <link rel="stylesheet" type="text/css" media="screen, projection" href="<%=request.getContextPath() %>/css/master.css" />
  <script type="text/javascript" src = "<%=request.getContextPath() %>/js/dojo/dojo.js">
    function hello() { // ➁
      dojo.xhrGet( { // ➂
        // The following URL must match that used to test the server.
        url: "http://localhost:7001/TestPageFlow/corps2.jsp", 
        handleAs: "text",
 
        timeout: 5000, // Time in milliseconds
 
        // The LOAD function will be called on a successful response.
        load: function(response, ioArgs) { // ➃
          dojo.byId("zone").innerHTML = response; // ➄
          return response; // ➅
        },
 
        // The ERROR function will be called in an error case.
        error: function(response, ioArgs) { // ➃
          console.error("HTTP status code: ", ioArgs.xhr.status); // ➆
          return response; // ➅
          }
        });
      }
  </script>
 
  <script type="text/javascript">
    dojo.addOnLoad(hello()); // ➇
  </script>
 
</head>
 
<body class="ph_C5FAC0" >
  <div id ='zone'>essai</div>
</body>
</html>
Merci