Can anyone tell me why Firefox would close a form early by adding a </form>
? It closes the form well before the submit button - so the form then won't submit.
The whole code for the form is a bit long to post here. It works fine in Chrome and IE, but Firefox seems to close the form early and removes the later </form>
.
The html is being output from PHP. Not sure if this would make a difference?
Editing in firebug doesn't work either. Any ideas appreciated.
Thanks
Have you tried using a validator to make sure your code is correct?
You can get Tidy to do the validation for you, or send your code to http://validator.w3.org/
That will tell you pretty quickly if you have some questionable markup that's causing the Firefox behavior.
This usually happens because you have a construct that should be interpreted as a form end tag or is seriously invalid enough that the browser is recovering from the error badly.
No, it isn't (although if you can create a reduced test case that still demonstrates the problem then that would be preferred.
It wouldn't. Browsers only care about what is in the HTTP response, not how it got there.
When a browser closes a form or div unexpectedly, it's usually because there's some kind of mistake in the code - like a closing div instead of an opening one.
I suggest you feed your code to the w3c Validator, and fix the errors.