Books I Like

Saturday, November 3, 2007

Strange File Upload Problem in safari

Last week one of the front end developer from my team mailed us the problem he was getting while trying to upload a file in Safari 3.0.3 on windows. He sent that, because he was getting some null pointer exception from the server (500 Error). Although, it was running perfectly on Firefox and IE.

Unfortunately, I had not the access to the server side code. However, the NPE suggested that something is not being passed to the server side.

After a little search got to this link http://www.webmasterworld.com/macintosh_webmaster/3300569.htm, which suggests:-
This happens if you set display:none in your onsubmit function, which is often used to hide the form during the upload.

After avoiding "display:none", the problem was fixed.

Get at Amazon