W3C home > Mailing lists > Public > www-html@w3.org > February 2002

Input Type=file default Value

From: Tanev Robert <RT@railconsult.de>
Date: Thu, 14 Feb 2002 14:44:48 +0100
Message-ID: <4BD11F615087D51189CC0000CB5647470983C3@RAILCONSULT>
To: "Www-Html (E-Mail)" <www-html@w3.org>
Hallo everybody,

we are facing the following problem: we want to provide an input element of
type file with a default value that should be displayed by default (actually
it is the current value of a specific attribute). While the value-property
is read only in IE5-6, we tried to set the defaultValue-property through

var oInput = document.createElement("INPUT");
oInput.type = "file";
oInput.defaultValue = _someValue_;

Unfortunately, the default value is not displayed. The documentation states,
that changing the defaultValue has no effect until a form was reseted, but
in our test case this did not happened.

Does anybody know, how to force a file input element to show an initial
value or does somebody has a workaround for this?


Robert Tanev
Received on Thursday, 14 February 2002 08:32:02 UTC

This archive was generated by hypermail 2.4.0 : Thursday, 30 April 2020 16:20:45 UTC