Bonjour.
Voila un problème ou je sèche totalement.

Le Script :
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<html>
  <head>
  <meta http-equiv="content-type" content="text/html; charset=windows-1250">
  <title>test</title>
 
  <script language="JavaScript" type="text/javascript">
  function setFormOrganisation(id_form,organisation,class_name,table_class_name)
  {
    var obj_form = document.getElementById(id_form);
    var id_zone_msg = 'sform_zone_msg_' + id_form;  
    var cote = organisation.toLowerCase();
    if (!class_name) class_name = 'zone_msg_form';
    if (!table_class_name) table_class_name = 'table_msg_form';
 
    var new_ul = document.createElement('ul');
    new_ul.setAttribute('className',class_name);
    new_ul.setAttribute('id',id_zone_msg);
    new_ul.appendChild(document.createTextNode('Messages : '));
 
 
    if (cote == 'top')    obj_form.insertBefore(new_ul,obj_form.firstChild);
    if (cote == 'bottom') obj_form.appendChild(new_ul);
 
    if (cote == 'right' || cote == 'left')
    { 
      var next = obj_form.nextSibling;
      var parent = obj_form.parentNode;
      var new_td_msg = document.createElement('td');
      var new_td_frm = document.createElement('td');
      var new_table  = document.createElement('table');
      new_table.setAttribute('className',table_class_name);
      new_td_msg.appendChild(new_ul);   
      new_td_frm.appendChild(obj_form); 
 
      new_ul.style.marginTop = '0px';
      new_ul.style.paddingLeft = '15px';
 
      if (cote == 'right')
      {
        new_table.appendChild(new_td_frm);
        new_table.appendChild(new_td_msg);
      }
      else
      {
        new_table.appendChild(new_td_msg);
        new_table.appendChild(new_td_frm);
      }
 
      parent.insertBefore(new_table,next); 
    }  
  } 
 
 
 
  </script>
 
 
  </head>
  <body onload="setFormOrganisation('f1','right');
                document.getElementById('sform_zone_msg_f1').innerHTML = 'TEST : <li>Une Option</li><li>Une Autre Option</li>';">
 
    <form id="f1" method="post" action="test.htm">
      Login : <input type="text" maxlength="30" size="25" /><br />
      Pass : <input type="text" maxlength="30" size="25" /><br />
      <br />
      <input type="submit" value="Envoyer" />
    </form> 
 
  </body>
</html>
Les explications :
Le but du script est de creer un zone de messages pour un formulaire, celle ci pouvant se positionner au haut en bas a gauche ou a droite.

Le problème se pose pour une création de la zone a gauche ou a droite.
Sous mozilla la zone est correctement créée et fonctionne. Par contre sous IE, rien ne s'affiche.

Pour rentrer dans les détails, le javascript va créer un tableau de 2 cases, une pur le formulaire, l'autre pour la zone de messages.
En gros après la fonction setFormOrganisation() on a :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
<body>
  <table>
    <td>
      <form> .... </form>
    </td>
    <td>
      <ul id="sform_zone_msg_f1">.....</ul>
    </td>
  </table>
</body>
Voila merci d'avance de prendre la peine de comprendre.
Si quelqu'un à la solution pour que ce script marche sous IE, il est le bienvenu