By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,839 Members | 2,270 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,839 IT Pros & Developers. It's quick & easy.

HTML + <input type="File">

P: n/a
Hi
I'm trying to set default value for input type file.

<input type="File" name="tx_pdffile" accept="*.pdf"
class="boxText" value="abc.pdf">

but this value (abc.pdf) doesnt appear in the text box..

Whats the solution???

Bhavin :(
Jul 19 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
You cannot specify a default value, unless your users are running like
Internet Explorer 1.0 or something. This is a security issue, and you
cannot control this. If this were possible, people would make a form with
<input type=file value=C:\mycreditcardnumbers.txt> and then
document.formname.submit() it onload.

Ray at home

"Bhavin" <an*******@discussions.microsoft.com> wrote in message
news:04****************************@phx.gbl...
Hi
I'm trying to set default value for input type file.

<input type="File" name="tx_pdffile" accept="*.pdf"
class="boxText" value="abc.pdf">

but this value (abc.pdf) doesnt appear in the text box..

Whats the solution???

Bhavin :(

Jul 19 '05 #2

P: n/a
> I'm trying to set default value for input type file.

Nope, can't be done. Thankfully. Your user will have to browse for the
file.

Jul 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.