ajout d'un joli message d'erreur.
darcs-hash:20070131000904-f46e9-311acc4b1e8206748e1a1bca6287389bd2ba4cbf.gz
This commit is contained in:
parent
a9839b576b
commit
7ae76132b7
2 changed files with 35 additions and 0 deletions
21
intranet/static/scripts/AJAX.js
Normal file
21
intranet/static/scripts/AJAX.js
Normal file
|
@ -0,0 +1,21 @@
|
|||
/*****************************
|
||||
Impression.AJAX
|
||||
*****************************/
|
||||
AJAX = {};
|
||||
|
||||
|
||||
AJAX.call = function(page, callBack) {
|
||||
logDebug("calling AJAX : " + page);
|
||||
var e = loadJSONDoc(page);
|
||||
e.addCallback(callBack);
|
||||
e.addErrback(AJAX.errorHandler);
|
||||
}
|
||||
|
||||
AJAX.errorHandler = function(d) {
|
||||
appendChildNodes(document.body,
|
||||
DIV({"class":"crans_ajax_error"}, "Erreur de communication, essayez de vous ", A({"href":"do_logout"}, "reconnecter"), "."));
|
||||
logError("AJAX Error: " + d);
|
||||
//Impression.AJAX.modifPrix("Erreur...", false);
|
||||
}
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue