473,395 Members | 1,383 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,395 software developers and data experts.

value attribute in element <input type="file">

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>

I realize we couldn't set the default filename for security reasons, and browsers
don't support that. (http://www.cs.tut.fi/~jkorpela/forms/file.html#value).

I really need to implement this feature, any workarounds to the problem?

Please advise. thanks!!
Jul 23 '05 #1
3 3067
On 12 Nov 2004 13:44:57 -0800, Matt <jr********@hotmail.com> wrote:

[snip]
I realize we couldn't set the default filename for security reasons, and
browsers don't support that.
(http://www.cs.tut.fi/~jkorpela/forms/file.html#value).

I really need to implement this feature, any workarounds to the problem?


A security restriction with a workaround isn't much of a restriction, is
it. :)

No, you cannot specify a default.

[snip]

Mike

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Jul 23 '05 #2
"Matt" <jr********@hotmail.com> wrote in message
news:ba**************************@posting.google.c om...
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>
I realize we couldn't set the default filename for security reasons, and browsers don't support that. (http://www.cs.tut.fi/~jkorpela/forms/file.html#value).
I really need to implement this feature, any workarounds to the problem?

Please advise. thanks!!


What are you really trying to do?

Can you describe the desired result not how you think it should be done?

Jul 23 '05 #3
Matt wrote:
If I do the following, the browse text box still cannot see
C:/hello world/test.txt.
Yep, thats the way it works.
<input type="file" name="fileName" value="C:/hello world/test.txt" size=80>

I realize we couldn't set the default filename for security reasons, and browsers
don't support that. (http://www.cs.tut.fi/~jkorpela/forms/file.html#value).
Correct.
I really need to implement this feature, any workarounds to the problem?
What problem? Its a security issue that you can *not* work around. If
you could, I could set the value of a file input to your registry file,
autosubmit the form, and then go from there to get whatever (if not all)
the files on your computer.
Please advise. thanks!!


See Above.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq
Jul 23 '05 #4

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

Similar topics

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...
7
by: Drew Berkemeyer | last post by:
I've encounted a pretty strange problem and I'm not quite sure what to make of it. I have a web service that consumes an XML file as well as a few other parameters. This web service works fine...
2
by: Tarkeshwar | last post by:
Hi All, I want to restrict the user from being entering the value in <input type="file">. It works fine in IE but not in Mozilla. I am sending my code also which works in IE and not in Mozilla.Can...
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" ...
1
by: ChollaPete | last post by:
This code: <form action="processScan.php" method="get"> <p> <?php print "Scan name: <input type=\"file\" name=\"tScanFileName\" value= \"{$scanFileName}\"><br>"; addHiddenCarryons(); ?>...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.