?
Solved

input type and filename value

Posted on 2000-03-14
1
Medium Priority
?
222 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

I've just discovered very important differences between Windows an Unix formats in Perl,at least 5.xx.. MOST IMPORTANT: Use Unix file format while saving Your script. otherwise it will have ^M s or smth likely weird in the EOL, Then DO NOT use m…
There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
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

649 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