form qui ne se submit pas
Bonjour à tous et toutes,
voici le code html généré par mon programme php
Code:
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
|
<body>
<!-- SlidesJS Required: Start Slides -->
<!-- The container is used to define the width of the slideshow -->
<div class="container">
<div id="slides">
<img src='/asf_test/support/atelier3/img/Sans titre.JPG' onClick="Valide(3)" alt='Hello'/>
<img src='img/untitled.bmp' onClick="Valide(8)" alt=''/>
<a href="#" class="slidesjs-previous slidesjs-navigation"><i class="icon-chevron-left icon-large"></i></a>
<a href="#" class="slidesjs-next slidesjs-navigation"><i class="icon-chevron-right icon-large"></i></a>
</div>
</div>
<form id='3' method='POST' action='ORG_gesateldet_bis.php' >
<input type = 'hidden' name = 'tabChamp[0]' id='tabChamp[0]'= value='num_atelier'/>
<input type = 'hidden' name = 'tabChamp[1]' id='tabChamp[1]'= value='titre'/>
<input type = 'hidden' name = 'tabChamp[2]' id='tabChamp[2]'= value='descr'/>
<input type = 'hidden' name = 'tabChamp[3]' id='tabChamp[3]'= value='duree'/>
<input type = 'hidden' name = 'tabChamp[4]' id='tabChamp[4]'= value='nb_stagiaire'/>
<input type = 'hidden' name = 'num_atelier' id='num_atelier'= value='3'/>
<input type = 'hidden' name = 'titre' id='titre'= value='Hello'/>
<input type = 'hidden' name = 'descr' id='descr'= value='hello'/>
<input type = 'hidden' name = 'duree' id='duree'= value='10'/>
<input type = 'hidden' name = 'nb_stagiaire' id='nb_stagiaire'= value='10'/>
</form>
<form id='8' method='POST' action='ORG_gesateldet_bis.php' >
<input type = 'hidden' name = 'tabChamp[0]' id='tabChamp[0]'= value='num_atelier'/>
<input type = 'hidden' name = 'tabChamp[1]' id='tabChamp[1]'= value='titre'/>
<input type = 'hidden' name = 'tabChamp[2]' id='tabChamp[2]'= value='descr'/>
<input type = 'hidden' name = 'tabChamp[3]' id='tabChamp[3]'= value='duree'/>
<input type = 'hidden' name = 'tabChamp[4]' id='tabChamp[4]'= value='nb_stagiaire'/>
<input type = 'hidden' name = 'num_atelier' id='num_atelier'= value='8'/>
<input type = 'hidden' name = 'titre' id='titre'= value=''/>
<input type = 'hidden' name = 'descr' id='descr'= value=''/>
<input type = 'hidden' name = 'duree' id='duree'= value='0'/>
<input type = 'hidden' name = 'nb_stagiaire' id='nb_stagiaire'= value='0'/>
</form>
<script>
function Valide(somme){
var obj= document.getElementById(somme);
alert(obj.id);
obj.submit();
}
</script>
</body>
</html> |
alert(obj.id); me renvoie l'id de obj. Cependant, le form ne se submit pas.
Merci d'avance à ceux qui participeront