开发者

google chrome not submitting form (js errors?)

I can't get Google Chrome to submit my form. It's getting pretty ridiculous. It ends up focusing a random form field (but it's the same one every time) instead.

No issues with FF or IE...

Two of the errors Chrome gives me in developer tools are:

An invalid fo开发者_StackOverflow中文版rm control with name='state' is not focusable.
An invalid form control with name='unitName' is not focusable.

BUT, these aren't even the one field that chrome is deciding to focus on. I'm at a loss, any one had any experience like this??


I had this exact problem with an input field marked "required" that was made invisible via javascript. Chrome could not display "please fill out this field" so it said An invalid form control with name='description' is not focusable in the console.


Without seeing the HTML, here's what a little Google'ing turned up:

  • https://code.google.com/p/chromium/issues/detail?id=45831
  • https://code.google.com/p/chromium/issues/detail?id=45640
  • http://domoconnor.com/2010/08/05/browser-issue-an-invalid-form-control-with-name-__-is-not-focusable/

The root of the problem appears to be assigning a maxlength attribute to a form field that is automatically populated by the browser, with a value that is longer than the maxlength limit.


I just had a similar problem, and for me, the fix was adding type="button" into my <button> tag.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜