Wrox Home  
Search P2P Archive for: Go

  Return to Index  

html_code_clinic thread: Need to set the Value of <Input type=File>


Message #1 by <wrwstuder@y...> on Wed, 24 Oct 2001 14:50:15 +0200
Try the following :

document.<form name>.<field name>.value="C:\somefile.txt";

At 14:50 24/10/01 +0200, you wrote:
>Hy everyone
>I need to set Value of <Input type='file' id='inp1'> per script in IE 4.
>If I do <Script> window.alert document.all.inp1.value </Script> then file 
>location the user did select is prompted.
>But when I do <Script>document.all.inp1.value = "C:\some.file"</Script> 
>nothing happens and I don't know why (maybe Microsoft don't want any files 
>sent without the user confirming it). Does anybody know a way to send a 
>file without having the user to select it?
>Any help very appreciated.
>
>Greetings
>   Roman
>
>
>

  Return to Index