aboutsummaryrefslogtreecommitdiffstats
path: root/phonegap/www
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2012-05-25 11:23:34 +0100
committerStruan Donald <struan@exo.org.uk>2012-05-25 11:23:34 +0100
commita7140e8b6fe96ba8cb77ee89794c28fd9f7c4873 (patch)
tree2c63c569bde29a0e9e71b75cfaaeb81e07709d10 /phonegap/www
parentf4a38ccf46227c5556ba9a77a1ae2a7a95ba7d8d (diff)
do not submit form from validation handler
Diffstat (limited to 'phonegap/www')
-rw-r--r--phonegap/www/js/fixmystreet.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/phonegap/www/js/fixmystreet.js b/phonegap/www/js/fixmystreet.js
index ac9b6e495..af4ec2e6f 100644
--- a/phonegap/www/js/fixmystreet.js
+++ b/phonegap/www/js/fixmystreet.js
@@ -218,7 +218,10 @@ $(function(){
$('input[type=submit]', form).prop("disabled", true);
}
- form.submit();
+ // this needs to be disabled otherwise it submits the form normally rather than
+ // over AJAX. This comment is to make this more likely to happen when updating
+ // this code.
+ //form.submit();
},
// make sure we can see the error message when we focus on invalid elements
showErrors: function( errorMap, errorList ) {