The file browser opens when you click on a file input (input type=file)
If you have an image that you want to open the file browser when you click on it you can hide the file browser and trigger the click event for the file browser.
I tested this with IE 6, in mozilla 5.0 it chrashed because of the style of the text input:
<label id="lblFile">File name comes here</label><br>
<input type=file id=fleMyFile style="position: absolute;top: -1000;left;-1000" onchange="document.getElementById('lblFile').innerHTML=this.value;">
<input value="Click here to open file browser" title="Click here to open file browser" style="cursor:hand" type=button onclick="document.getElementById('fleMyFile').click();">
Harmmeijer, thank you very mutch for your help it works perfectly. One additional thing what I'd like to know yet is it possible makes a filter for file type what the user could open from this bowser?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.