Bonjour,
J'aimerai appeler ma fonction javascript lorsque mon bouton est actionné.
voici mon code:
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
 
<html>
	<head>
		<title>Fiche de lot tri final</title>
		<script type="text/javascript">
			cacher(information_process)
			{
				objet = document.getElementById(information_process);
				if(objet.style.visibility == 'hidden')
				{
					objet.style.visibility == 'visible'
				}else
				{
					objet.style.visibility == 'hidden'
				}
			}
		</script> 
	</head>
	<body>
 
 
 
		<form method="post" name="information_process" action="http://localhost/planprod/Carnet de lot/FT/index.php"> 
			<fieldset> <div id="information_process" style="visibility:visible">
				<legend> Information process </legend>
				<p>Choisissez un Process:</p>
				<select name = "process" id = "menuprocess">
					<?php
                                                $resultat = mysql_query("select libelle_process from process") or die ("Requête non executée.");
 
                                                while ($ligne = mysql_fetch_array($resultat))
                                                {
                                                        echo '<option>'.$ligne['libelle_process'].'</option>';
                                                }
                                        ?>
				</select>
 
				<br><br>Quantité<input type="text" name="qte">
				<input type="submit" value="Valider" name="Information_process"  onclick="cacher()" action="self.location.href='http://localhost/planprod/Carnet de lot/FT/index.php'">
</body>
</html>
Lorsque l'on clique sur le bouton valider j'aimerai que ma fonction cacher s'exécute afin de cacher ce formulaire.
Merci pour votre aide