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
| <html>
<head>
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
<script language="JavaScript">
function Verif (LeForm)
{
var Fichier = LeForm.Fichier;
if (window.XMLHttpRequest){ MaFontion = new XMLHttpRequest();}
else if (window.ActiveXObject) {MaFontion = new ActiveXObject('Microsoft.XMLHTTP');}
else {
alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest...");
MaFontion = false; }
MaFontion.open('POST',"SendPJ.php",true);
MaFontion.onreadystatechange = function()
{
if (MaFontion.readyState == 4 && MaFontion.status==200)
{document.getElementById ('LaReponse').innerHTML=''+MaFontion.responseText+'';}
}
MaFontion.setRequestHeader('Content-type','application/x-www-form-urlencoded');
MaFontion.send('Fichier='+Fichier);
alert("OK \n");
}
</script>
</head>
<body>
<div id="main">
<form method="post" action="SendPJ.php" subject="Renseignements" enctype="multipart/form-data"">
<div id="texte">Fichier :</div>
<boite><input id="Fichier" name="Fichier" type="file"></boite>
<br>
<input value="Envoyer" type=Button onClick="Verif(this.form)">
<input value="Effacer" name="reset" type="reset">
</form>
</div>
</body>
</html> |
Partager