diff options
author | Struan Donald <struan@exo.org.uk> | 2012-05-25 11:23:34 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2012-05-25 11:23:34 +0100 |
commit | a7140e8b6fe96ba8cb77ee89794c28fd9f7c4873 (patch) | |
tree | 2c63c569bde29a0e9e71b75cfaaeb81e07709d10 | |
parent | f4a38ccf46227c5556ba9a77a1ae2a7a95ba7d8d (diff) |
do not submit form from validation handler
-rw-r--r-- | phonegap/www/js/fixmystreet.js | 5 |
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 ) { |