Topic: Why $('form')[0].submit() ?

The code in example on  http://www.plupload.com/example_queuewidget.php uses $('form')[0].submit() to submit the form. I thought that $("#myFormId").submit() would work too, but it caused the browser to lock up. I don't get why. According to http://www.w3schools.com/jquery/event_submit.asp, my expectation was correct, but both IE and Firefox proved me wrong. Why?

Re: Why $('form')[0].submit() ?

when using $("#myFormId").submit() it should work.

please post your entire code, preferably in jsfiddle, like:

http://jsfiddle.net/LeandroJF/AM8Zp/

Re: Why $('form')[0].submit() ?

The code is at http://www.plupload.com/example_queuewidget.php. I simply changed what I described and some paths.

I am using jquery 1.8.2.

Re: Why $('form')[0].submit() ?

I have a plupload form running in my site with the same code as http://www.plupload.com/example_queuewidget.php and I changed the jquery selector to the id of my form and it's working fine. So I'm assuming that you made some mistake when changing your code.

5 (edited by roman 2012-11-03 17:01:45)

Re: Why $('form')[0].submit() ?

I've just tried it in IE again, and it froze again. May I see your page with the working form?

Re: Why $('form')[0].submit() ?

unfortunately, my page is in a restrict area.

Try updating your flash and see if it works

7 (edited by roman 2012-11-05 04:06:41)

Re: Why $('form')[0].submit() ?

I have the latest version installed – 11,4,402,287.

I've also tried with jQuery 1.4.2 – the same result as with 1.8.2.

Re: Why $('form')[0].submit() ?

so, I can't imagine what's the problem then.