Click to See Complete Forum and Search --> : Opening a File dialog box


cpb123
May 23rd, 2005, 09:00 AM
Hi,

I am wanting to open a file dialog box through client side scripting. I know that the html tag <input type="file"> will do this for me but I don't want the textfield that appears with the button. Any help would be most grateful

Thank you in advance.

John S
May 25th, 2005, 11:28 PM
This will help I am sure.

<FORM name="dummy" >
<INPUT type="file" class="file" style="display: none" name="hiddenFileName">
<input type="text" style="visibility:hidden" name="Filename">
<input type="button" name="openFile" width=40 height=18 value="open file"
onclick='document.all.hiddenFileName.click(); alert(document.all.hiddenFileName.value)'>
</FORM>