Hi,
I urgently need help. My code should let a user select an image file for upload, view the image on the browser to be able to set the image size then upload the image. It should also be compatible in IE, Opera and Firefox. Currently everything works well in IE only.
Problem:
1) I can't view an image from a local drive in Opera and Firefox. I am aware that Firefox doesn't link local files, so I set user_pref("secu rity.checkloadu ri", false); in user.js (Profiles folder), but it is still not working. i checked on about:config on the browser and the value is set as indicated. Why can't i view my images?
<img src='c:\misc\ca lc.jpg'>
2) When trying to access the file chosen by the user, i can only get the filename and not the whole path in Opera and Firefox.
eg. html code: <input name='userfile' type='file'>
window.alert(do cument.all.item ('userfile').va lue); returns 'calc.jpg' and not 'c:\misc\calc.j pg'. How do i get the path?
3) I read that the height and width attributes have been deprecated. how then can i allow my user to set up their sizes if i can only set image sizes in css and not in the html code itself:
<img src='c:\misc\ca lc.jpg' height='$userHe ight' width='$userWid th'>
(I'm also using php in mycode)
i'd really appreciate it if i can get a fast response. thanks.
Ntombi
I urgently need help. My code should let a user select an image file for upload, view the image on the browser to be able to set the image size then upload the image. It should also be compatible in IE, Opera and Firefox. Currently everything works well in IE only.
Problem:
1) I can't view an image from a local drive in Opera and Firefox. I am aware that Firefox doesn't link local files, so I set user_pref("secu rity.checkloadu ri", false); in user.js (Profiles folder), but it is still not working. i checked on about:config on the browser and the value is set as indicated. Why can't i view my images?
<img src='c:\misc\ca lc.jpg'>
2) When trying to access the file chosen by the user, i can only get the filename and not the whole path in Opera and Firefox.
eg. html code: <input name='userfile' type='file'>
window.alert(do cument.all.item ('userfile').va lue); returns 'calc.jpg' and not 'c:\misc\calc.j pg'. How do i get the path?
3) I read that the height and width attributes have been deprecated. how then can i allow my user to set up their sizes if i can only set image sizes in css and not in the html code itself:
<img src='c:\misc\ca lc.jpg' height='$userHe ight' width='$userWid th'>
(I'm also using php in mycode)
i'd really appreciate it if i can get a fast response. thanks.
Ntombi
Comment