Skip to content Skip to sidebar Skip to footer

Nested File Input Doesn't Work In Firefox

I have the following HTML:

Solution 1:

The reason for the difference in behaviour is most likely that the code is invalid.

See HTML 4: 17.4 The INPUT element: "Start tag: required, End tag: forbidden"

So, you can't nest an input tag inside another. Different browsers handle invalid markup differently, so they can for example ignore that one is inside the other and place them beside each other, or ignore the inner tag completely.

If you are curious, you can use FireBug to examine the DOM to find out what elements are created from the markup, but it's really moot as invalid markup won't work reliably anyway.

Post a Comment for "Nested File Input Doesn't Work In Firefox"