function verif_form_commentaire() { $.ajax({ type: "POST", url: "/ajax/commenter.php", data: $("#form_commentaire").serialize()+"&mode=verif_form", dataType : "json", success: function(ret){ if($(ret)[0].etat=='1'){ document.getElementById("id_commentaire").value = ''; alert($(ret)[0].message); var url_retour = document.location.href.split(new RegExp("#", "g")); suffix = (url_retour[0].indexOf("?") != "-1" ? "&" : "?")+"pcache=1"; document.location.href = url_retour[0]+suffix; } else{ var now = new Date(); document.getElementById("id_captcha_image").src = document.getElementById("id_captcha_image").src+now.getMilliseconds(); alert($(ret)[0].message); } } }); return true; } document.write("