472,352 Members | 1,450 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,352 software developers and data experts.

<input type="file" value="path/file.jpeg"> in Firefox

This code:

<form action="processScan.php" method="get">
<p>
<?php
print "Scan name: <input type=\"file\" name=\"tScanFileName\" value=
\"{$scanFileName}\"><br>";
addHiddenCarryons();
?>
<input type="submit">
</form>

does not render with the value attribute's value as the default text.
I.e., then the form renders, I want the string value of $scanFileName
already in the input field as the default text. I'm using Firefox
2.0.0.12, PHP 5.2.4 and Apache 1.3.33.

Any ideas?

Thanks,
Mark
Mar 20 '08 #1
1 13873
..oO(ChollaPete)
>This code:

<form action="processScan.php" method="get">
<p>
<?php
print "Scan name: <input type=\"file\" name=\"tScanFileName\" value=
\"{$scanFileName}\"><br>";
addHiddenCarryons();
?>
<input type="submit">
</form>

does not render with the value attribute's value as the default text.
I.e., then the form renders, I want the string value of $scanFileName
already in the input field as the default text. I'm using Firefox
2.0.0.12, PHP 5.2.4 and Apache 1.3.33.

Any ideas?
The 'file' input control does not allow default values for security
reasons. This would make it too easy to steal files from the user's
machine.

And BTW: HTML also allows single quotes around attributes. This avoids
the ugly escaping like above.

Micha
Mar 20 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Jarrod | last post by:
Just reading from a previous thread about multiple uploads. I wanted to use script to create multiple input file elements that put the path in as...
2
by: Bhavin | last post by:
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"> ...
1
by: Jesper Hermansen | last post by:
Hi! I'm making a system that will generate Winamp-playlists. To make it easy for the user to add a file to the list, I'm using <input...
2
by: Matt | last post by:
If I do the following, the browse text box still cannot see C:/hello world/test.txt. <input type="file" name="fileName" value="C:/hello...
2
by: Laermans_k | last post by:
Hi, Does anyone have a solution to use the <input type="file" id="filechooser"> and the <input type="submit" id="submitbutton"> in 1 button click?...
1
by: Mark Sandfox | last post by:
Is there a way to restrict the user to only selecting and sending either a ..gif or .jpg. Everything I have read says this option can not be done...
1
by: nad2zen | last post by:
Hi All, How to set the path value to file object using javascript. now i am trying to upload the file without using browse button, but i could...
7
by: Tim Slattery | last post by:
I'm trying to handle the onChange event in an <input type="file"> element. In IE, there's no problem: the event fires when a file in the "open" box...
3
by: eeeeman | last post by:
This one has really got me! Im trying to write a value to a input type="file" form element using client-side javascript. I have tried the...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.