summaryrefslogtreecommitdiff
path: root/js/util.js
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-06-10 09:09:57 -0700
committerEvan Prodromou <evan@controlyourself.ca>2009-06-10 09:09:57 -0700
commitc0853e304051a3b8ceacb95d6977ca62df5e25a6 (patch)
treebc6b296a422950bc4ae76a20a42f62b751e4ab14 /js/util.js
parented627bb4bd6424325478412055d295b185f9f662 (diff)
parent1a077b0a7fa699302d7ff2ff59feb118d5653c15 (diff)
Merge branch '0.7.x' into 0.8.x
Diffstat (limited to 'js/util.js')
-rw-r--r--js/util.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/js/util.js b/js/util.js
index b712ba8e2..786b763ee 100644
--- a/js/util.js
+++ b/js/util.js
@@ -178,7 +178,14 @@ $(document).ready(function(){
$('#form_notice').append(document._importNode($(".error", xhr.responseXML).get(0), true));
}
else {
- alert("Sorry! We had trouble sending your notice ("+xhr.status+" "+xhr.statusText+"). Please report the problem to the site administrator if this happens again.");
+ var HTTP20x30x = [200, 201, 202, 203, 204, 205, 206, 300, 301, 302, 303, 304, 305, 306, 307];
+ if(jQuery.inArray(parseInt(xhr.status), HTTP20x30x) < 0) {
+ alert("Sorry! We had trouble sending your notice ("+xhr.status+" "+xhr.statusText+"). Please report the problem to the site administrator if this happens again.");
+ }
+ else {
+ $("#notice_data-text").val("");
+ counter();
+ }
}
}
},