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
| <?php
function maFonctionAjax(action,JSnum_rep_en_cours,parde,JSpour_texte_zoom,num_photo_zoom)
{
var MonAjax;
if (window.XMLHttpRequest){ MonAjax = new XMLHttpRequest();}
else if (window.ActiveXObject) {MonAjax = new ActiveXObject('Microsoft.XMLHTTP');}
else {
alert("Votre navigateur n'est pas adapté pour faire des requêtes AJAX...");
MonAjax = false; }
MonAjax.open('POST',enctype="multipart/form-data" ,"upload.php",true);
MonAjax.onreadystatechange = function()
{
if (MonAjax.readyState == 4 && MonAjax.status == 200)
{
if (action!=777 && action!=888 )
{
document.getElementById('LePave_hd').innerHTML = MonAjax.responseText;
}
}
}
MonAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
MonAjax.send('LeFic='+LeFic+'&VaEn='+VaEn);
}
function UnUpload(LeFic,VaEn)
{
<!-- LeFic devrais avoir un type="file" -->
maFonctionAjax(LeFic,VaEn);
}
?> |
Partager