diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2007-11-18 23:25:21 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2007-11-18 23:25:21 +0000 |
commit | 950f0f9e08c6e6dd8dd6a4908d72acf41e6e2bdc (patch) | |
tree | b48d1e73096435b47ae7a63b6b7c20aaf2c4e608 /usr/local/www/headjs.php | |
parent | c9a4b3f267f0b216c807ba26fb6bab0b57f1bb86 (diff) | |
download | pfsense-950f0f9e08c6e6dd8dd6a4908d72acf41e6e2bdc.zip pfsense-950f0f9e08c6e6dd8dd6a4908d72acf41e6e2bdc.tar.gz |
Correctly show 401 errors.
Diffstat (limited to 'usr/local/www/headjs.php')
-rw-r--r-- | usr/local/www/headjs.php | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/usr/local/www/headjs.php b/usr/local/www/headjs.php index e2b4e20..09b1b44 100644 --- a/usr/local/www/headjs.php +++ b/usr/local/www/headjs.php @@ -82,7 +82,7 @@ function getHeadJS() { var responseText = resp.responseText; // debugging helper - //alert(responseText); + alert(responseText); if(responseText.indexOf('html') > 0) { /* somehow we have been fed an html page! */ @@ -95,7 +95,14 @@ function getHeadJS() { /* this function will be called if an HTTP error will be triggered */ function formFailure(resp) { - alert('An error occured while saving the data ' + resp.responseText); + showajaxmessage(resp.responseText); + if($('submit')) + $('submit').style.visibility = 'visible'; + if($('cancelbutton')) + $('cancelbutton').style.visibility = 'visible'; + if($('loading')) + $('loading').style.visibility = 'hidden'; + } function showajaxmessage(message) { @@ -153,4 +160,4 @@ function getHeadJS() { return $headjs; } -?> +?>
\ No newline at end of file |