Skip to content
Snippets Groups Projects
Verified Commit a43d0cbf authored by David Beniamine's avatar David Beniamine
Browse files

Workaround : ajax timeout

parent b93806af
Branches
No related tags found
No related merge requests found
......@@ -36,19 +36,23 @@
echo "<div id='result'><p>Démarrage demandé pour la machine $mac, veuillez patienter</p></div>";
?>
<script language="javascript">
function sendpost(retry){
$.ajax({
type: "POST",
data: '<?php echo "mac=$mac"?>',
url: 'boot.php',
timeout: 120000,
timeout: 60000,
error: function(reponse){
alert('Erreur : timeout');
$("#result").html("Echec") ;
if(retry > 0){
sendpost(retry-1);
}
},
success: function(response) {
$("#result").html(response) ;
}
});
}
sendpost(1);
</script>
<?php
break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment