Page is a not externally linkable
- Browsers
-- Opera Browser Usage and Support
---- Setting default value for file upload form


adb64 - 7:51 am on Dec 20, 2005 (gmt 0)


Hi encyclo,

Thanks for your answer. I'm aware of possible security issues and the Linux 'problem', my idea was to ask the user for a default path to the images and prepend that for each filename.

I already did some testing with javascripting but I think it is almost impossible to do. What I did was the following:

<input id="fileinput" type="file" size="35" name="imgupload" value="a:\image.jpg">

<a href="#" onlick="fileinput.value='a:\image.jpg'; return false;">a:\image.jpg</a>

In this case the user can click the filename from a list extracted from the HTML test which will be inserted in the input box. But this also doesn't work. Another thing I tried was this:

<input id="fileinput" type="text" size="35" name="imgupload" value="a:\image.jpg">

<a href="#" onlick="fileinput.type='file'; return false;">a:\image.jpg</a>

This also doesn't work, as soon as the link is clicked, a 'Browse' button appears but also the box is emptied.

As for now I have no idea how to solve this apart from displaying a list of filenames and the user has to select and copy and paste them in the input box.

Arjan


Thread source:: http://www.webmasterworld.com/opera_browser/398.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com