View Full Version : Can't submit a form that is in a non-displayed element

05-17-2007, 01:25 AM
I have a panel-like interface, where content is seperated in div's, with only 1 div being displayed at a time. The rest of them have 'display' set to 'none'. In one of those div's is an iframe, with a form in it that i want to submit via javascript.

The problem is that in Firefox, if I am not currently viewing the div (panel) that has the iframe and form in it, then the submit will not work. I put traces in the code, and the submit code is getting executed, though the submission never actually takes place. This problem does not exist in IE.

I can't find any info on the web about limitations of submitting forms that are not displayed. In fact, i know i can submit hidden forms quite easily, though this sitation is different from that, since i'm submitting a form that is in an iframe, which is in div that is not being displayed.

Can anyone confirm this is a bug or help me have think of a workaround?

05-17-2007, 01:26 AM
Well if the form is to be hidden anyways why just use hidden form inputs on the page in the first place?

05-18-2007, 02:04 AM
The form is an iframe that may or may not be visible, depending on where the user is navigating. I can't take the form, or its inputs out of the iframe.