473,320 Members | 1,977 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 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 13991
..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 a default (or something like that) based on ASP...
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"> but this value (abc.pdf) doesnt appear in the text...
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 type="file">. The problem with this is that I only get...
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 world/test.txt" size=80> Any ideas? and workarounds...
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? I've already tried to create a javascript...
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 by design (security reasons). I find that irronic...
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 not set the path value.. see my code: <form...
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 is doubleclicked, or the "Open" button in the 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 obvious, simply writing: <input type="file" ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.