weblog

Safari image upload form problem

Recently I was developing a user interface wich included a form to upload images to the server, well I thought it will be nice to display the form and once the user clicked on the upload button the form will disappear and a hidden div will appear displaying an informative message for the user basically saying the upload will take a few minutes. So everything seemed to work ok in almost all browers, until it was time to use the application in Safari for mac, for some reason PHP Hypertext Preprocessor">PHP was not catching the values of $_FILE, after a few hours trying to figure out the problem I found out Safari doesn’t like for example :


document.getElementById('name-of-element').display = "none";

instead something like this gave me the results I expected :


document.getElementById('name-of-element').position = "absolute"; document.getElementById('name-of-element').left = "-1000px";

So from what I have read Safari doesn’t like element.display = “none”. I hope this is useful for someone that is having the same problems as I almost tried to get rid of the javascript and go back to the old methods. I’m still not convinced by the use of too much javascript or AJAX on web applications since they might give unexpected results on different browsers

Post your opinion:

destitute
destitute
destitute
destitute