HTML & WEB-Design

Moderators: Jonathan
Number of threads: 1249
Number of posts: 3348

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Form input type="file" problem!!!! Posted by muran on 27 Aug 2001 at 5:59 AM
Can anyone tell me how I can set a default value on a <input type="file"> in a form.
Ive tried value="some value" but it doesnt work.
Anyone have any suggestion?
The code Im using looks like this:
<input type="file" name="any_name" value="c:\text.txt">
the value="c:\text.txt" doesnt work.....

/Muran

Report
Re: Form input type="file" problem!!!! Posted by James Ferrara on 27 Aug 2001 at 9:46 AM
What exactly are you trying to do?

Is this a form to upload a file?

Report
Re: Form input type="file" problem!!!! Posted by muran on 27 Aug 2001 at 11:01 AM
Yepp its a form to upload a file....
When you enter the input="file" you get a textfield and a browse-button.
When you browse the file you want the path to that file is written in the textfield...
I want to have a default value in that textfield.....and still give the user the option of browsing another file....



: What exactly are you trying to do?
:
: Is this a form to upload a file?
:


Report
Re: Form input type="file" problem!!!! Posted by James Ferrara on 29 Aug 2001 at 7:00 AM
if that's the question, it's a simple "input" kinda question.

a normal field would go like this: <input type="text" value="googoo"> and have googoo as the default.

just try <input tye="file" value="whateverdefault">

Report
Re: Form input type="file" problem!!!! Posted by muran on 30 Aug 2001 at 12:21 AM
I hav tried that but the value is ignored.... =(



Report
Re: Form input type="file" problem!!!! Posted by digit5000 on 9 Sept 2001 at 8:10 PM
I don't think you can do it. Reason. Well if you can put a default value in this field and you have a onload="submit()" then you can put any file from the clients machine to your server without them knowing. Just a guess.




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.