The Macintosh Webmaster Forum

Just wanted to share some tribulations I had trying to get my html upload form working in safari. There is an old post on webmaster world that also covers these issues and correctly points out that if you use display=none to hide your file inputs before you submit your form, the files will not be posted. This is mostly true and the same thing happens if you set visibility to hidden. The post incorrectly states that this happens when your display value change is placed in the function called by your form's onSubmit event handler and states that a fix for this problem is to place the display value change in an onclick event for your submit button. A fix that does work is simply submitting the form first and then changing the display value. ex:

works in Safari:

formObj.submit(); fileInputObjToHide.style.display = 'none';

doesn't work in safari:

fileInputObjToHide.style.display = 'none'; formObj.submit();

The older post also references an article stating that safari can hang 30-40 percent of the time when you upload. I haven't looked into that one that much except to say I tried the solution in the post (using a connection close http header on the form page) and it didnt work. anyone known of a fix for this? at the moment i'm using php and in lieu of posting a lot of code heres the headers im sending (most are to prevent caching):