Is Safari right or wrong? Should "display: none" prevent form elements from being submitted?

Hello, everyone!

While developing a Web application at work, one of my employers discovered 
that Safari for Mac OS X (both 1.3 on 10.3 and 2.0 on 10.4) was failing to 
upload files to a system that works fine under Firefox and Internet Explorer 
for Windows (I did not personally try Opera, etc.) and I tracked the problem 
to Safari not submitting the file with the rest of the form when I hide the 
form controls with JavaScript upon form submission.  Our work-around was to 
simply leave the file input field alone, but I am left wondering which 
behavior is correct or if perhaps there is no relevant specification.

Should dynamically setting "display: none" for a form input element prevent 
that element from being submitted--that is, treated as though it does not 
exist at all--or should it merely be removed from the rendering of a 
document?  I have seen the documentation [1], but I am still not certain 
which is the correct behavior, so I would very much appreciate an 
authoritative answer.  Thank you in advance to anyone who can provide one.


Kind regards and thank you for your time,

Brian Sexton 

Received on Thursday, 23 June 2005 06:11:46 UTC