diff options
author | makkalot <makkalot@gmail.com> | 2008-08-06 01:14:08 +0300 |
---|---|---|
committer | makkalot <makkalot@gmail.com> | 2008-08-06 01:14:08 +0300 |
commit | 747f583b33a6ee863aeae404d701113bba7a5f5e (patch) | |
tree | 958f2d408ab62bc0f3151ca3355d1a4bfd83cc1c /funcweb | |
parent | fd7271a25fb26e15378e4a73546f83bd1e34459f (diff) | |
download | func-747f583b33a6ee863aeae404d701113bba7a5f5e.tar.gz func-747f583b33a6ee863aeae404d701113bba7a5f5e.tar.xz func-747f583b33a6ee863aeae404d701113bba7a5f5e.zip |
better error messages
Diffstat (limited to 'funcweb')
-rw-r--r-- | funcweb/funcweb/static/javascript/async_tools.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/funcweb/funcweb/static/javascript/async_tools.js b/funcweb/funcweb/static/javascript/async_tools.js index f96ebd2..98169fa 100644 --- a/funcweb/funcweb/static/javascript/async_tools.js +++ b/funcweb/funcweb/static/javascript/async_tools.js @@ -5,7 +5,8 @@ function poll_async_changes(result){ */ //runs on the index page and polls the server side if there is new - //change in the async db + //change in the async db + //alert(repr(result)); if (result['changed']==true){ //alert('Check it '); var the_change_msg = "We have some async changes : "; @@ -27,9 +28,14 @@ function check_async_change(){ } )); d.addCallback(poll_async_changes); + d.addErrback(poll_error); } function poll_error(error){ - alert("Some error in xmlHttpRequest check your connection : "); + var error_msg = "Async Error : probably you have shut down your server or your session has expired try to REFRESH and check your connection !"; + var error_div = getElement("globalerror"); + if (error_div != null){ + error_div.innerHTML = error_msg; + } } |