开发者

Form doesn't work in Safari and Chrome, but does work in ie and firefox

this is my first post on this forum. So hi!

I have a problem. I've created an online tool for mystery shoppers to encode and validate visits they have don all over europe. So far, my automatically generated forms based on php and mysql data works great. I have one recurring problem. The forms works great in ie (all versions) and firefox, but not in chrome or safari.

I have used jquery validation on the forms so maybe there's a problem with that.

The problem: When I work in Safari, nothing happens if I click on submit the form?开发者_JAVA百科 When I work in Chrome, the jquery validation works great, but the form doesn't submit?!?

My form start and end tags:

<form action="encodage_finish.php" method="post" id="encodageForm">
<input name="submit" type="submit" value="<?php echo $translation["SubBodyFormButton"]; ?>" id="verzendknop" /></form>

My jquery code:

$("#encodageForm").validate({

    submitHandler: function(form) {
        $('div.error').toggle('normal');
        dateISO: true;
        form.submit();
    }
});


I'm not sure what this is:

dateISO: true;

It looks like a validation rule slipped in there on a copy/paste, just remove that as it's invalid script:

$("#encodageForm").validate({
  submitHandler: function(form) {
    $('div.error').toggle('normal');
    form.submit();
  }
});

Currently because of that dateISO: true; the browsers that aren't working are blowing up when reading that line in the submit handler, depending on how the browser works, some are blowing up when loading your script initially, others when executing submitHandler for the first time.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜