summaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
authorprashant2015-10-01 16:11:51 +0530
committerprashant2015-10-01 16:11:51 +0530
commitcb5e76d42beb141908b965be2973bbeb7649f55e (patch)
tree1f4db230ffd4fda6bb13e6db3ac3d9232497899e /index.php
parentedf0ff51a68c1b95cab7cdfee02f9cfef8274093 (diff)
downloadscilab_cloud_interface-cb5e76d42beb141908b965be2973bbeb7649f55e.tar.gz
scilab_cloud_interface-cb5e76d42beb141908b965be2973bbeb7649f55e.tar.bz2
scilab_cloud_interface-cb5e76d42beb141908b965be2973bbeb7649f55e.zip
added server timeout error message on server response
Diffstat (limited to 'index.php')
-rw-r--r--[-rwxr-xr-x]index.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/index.php b/index.php
index db077f2..be513c3 100755..100644
--- a/index.php
+++ b/index.php
@@ -183,6 +183,7 @@
url: "submit.php",
data:{code:$("#input").val(),graphicsmode:val},
dataType: "json",
+ timeout: 15000,
success: function(resp ) {
msg = resp["response"];
@@ -199,13 +200,18 @@
$("#single_image").trigger("click");
}
},
- error: function () {
+ error: function (x, t, m) {
$("#submit").html("Execute");
$('.cls-body').removeClass('loading-cls');
$('#submit').removeClass('loading-cls');
$('#input').removeClass('loading-cls');
$('#output').removeClass('loading-cls');
-
+ if(t==="timeout") {
+ alert("Server is unable to serve your request. Please try after some time");
+
+ } else {
+ alert(t);
+ }
$("#output").val('502 Bad Gateway');
}
});