Nested Form not working in IE

nested form not submitting in internet explorer

Junior Member

joined:June 11, 2009
posts: 77
votes: 0

Hello,

I just found out after making a very complicated web form that the submit button doesn't work in Internet Explorer but it works fine in Firefox. The form has a nested form which is necessary (its an ajax file upload form).

Senior Member

joined:Nov 28, 2004
posts:7999
votes: 0

Well, as posted, it's "working" in both FF and IE7 here. But I don't have benefit of your CSS, so at first thought it would be something in the CSS . . .

However, I then noticed you have a form nested inside a form, and this is of course not valid. It was at this point I noticed both were submitting to insertSurvey.php. which is probably what you mean by not working.

Senior Member

joined:Oct 15, 2004
posts:941
votes: 0

form inside a form could be ajax based - not sure though

on your proble, here are a couple of ideas: make sure your submit buttons are named differently make sure to use these new names in your proccess form make sure you use id='' in all your form elements (this has to do with your css and or any javascripts you may use in your form)

So if they opt not to upload an image, it completes the process without an image. If they upload an image and have not clicked "next," it returns to the same form. To avoid confusion, in this condition you may choose not to display the upload portion of the form.

As mentioned you can use Ajax/JS to dynamically submit a separate form, but IMO this only complicates the process and adds a possible problem when JS is disabled or broken.

I have not experimented with nested forms because it's invalid html and as you see it can produce unexpected results. My guess is that no matter what you do, the "outer" containing form action will be the one submitted to.