Closed Bug 582178 Opened 14 years ago Closed 14 years ago

jquery's submit() thing, whatever it is, doesn't work

Categories

(Core :: DOM: Core & HTML, defect)

x86_64
Windows 7
defect
Not set
major

Tracking

()

RESOLVED INVALID

People

(Reporter: david71rj, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.0 Safari/534.3
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.1; pt-BR; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8

The example URL uses jQuery to easy my work, but you can try with others navigators and see that the problem occur only in Firefox and IE. Chrome and Opera works fine.

Translating: when you make a form by document.create, and submit this, don't will work. You need to append on document.

Bye.

Reproducible: Always

Steps to Reproduce:
1. Make a form, without attach on document.
2. Use submit method in this.
Actual Results:  
In FF and IE don't work, but CHR and OP works fine.

Expected Results:  
The page need be submited.
> The example URL uses jQuery to easy my work

Well, the issue is _somewhere_ in jQuery as far as I can tell.  This testcase:

  <!DOCTYPE html>
  <script>
    var f = document.createElement("form");
    form.action = "http://www.example.org";
    form.method = "get";
    form.submit();
  </script>

doesn't submit the form in either Chrome or Firefox.  And the return value of that $() call with jquery is NOT an HTMLFormElement.  It's some random object jquery creates.

jresig, what does the submit() method on that random object actually do?
Summary: Submit a <form/> don't attached on document don't works → jquery's submit() thing, whatever it is, doesn't work
You are right, Boris. This is a jQuery bug. I make a revision for the last script with your core (http://jsbin.com/eyopi5/2), C/O/F/I don't works with this script.
Well, in this case, I think that it is a bogus, for FF :p

Thanks.
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → INVALID
Component: HTML: Form Submission → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.