Safari unfortunately seems to let you submit but doesn't actually _work_ on localhost. Doesn't throw an exception here, just never sends a response...
return false;
}
- x.open(sajax_request_type, uri, true);
+ try {
+ x.open(sajax_request_type, uri, true);
+ } catch (e) {
+ if (window.location.hostname == "localhost") {
+ alert("Your browser blocks XMLHttpRequest to 'localhost', try using a real hostname for development/testing.");
+ }
+ throw e;
+ }
if (sajax_request_type == "POST") {
x.setRequestHeader("Method", "POST " + uri + " HTTP/1.1");
x.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");