?
Solved

input type and filename value

Posted on 2000-03-14
1
Medium Priority
?
219 Views
Last Modified: 2010-05-18
i have code that prints out a html form that will
send a file to a cgi script but id like
to do an error check and when someone leaves
out one of the options they will be sent
back to the same script and whatever
they filled in before will be filled in again

i tried this with:

 It was $textfile<br>     <input type="file" name="fileName" value="$textfile"><BR>

now with all the other fields (which we just text boxes and drop down menus) this method of assigning value to be some value (ie value="$previous_entry1") worked every time but not for when i try
to have an entry for a file.....

in the code

 It was $textfile<br>     <input type="file" name="fileName" value="$textfile"><BR>

it prints out what $textfile was but it will not put the value of $textfile in the textbox.....

ie it says
it was text.txt (and then it prints and empty text box - with no "text.txt"

how do i get it to put the value into the textbox?


               
0
Comment
Question by:boofulls
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 10

Accepted Solution

by:
makerp earned 150 total points
ID: 2615485
although the HTML spec says you can put a value in a file control browsers actually ignore it for security reasons

activstate perl help says

'For security reasons, browsers don't pay any attention to this field, and so the starting value will always be blank. Worse, the field loses its ``sticky'' behavior and forgets its previous contents. The starting value field is called for in the HTML specification, however, and possibly some browser will eventually provide support for it.'


im sorry mate.. it cannt be done .. well not yet any way. browsers may eventually allow this....
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question