Tarkeshwar wrote:
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 anybody
have the solution.
There isn't one. You can disable the element, but then the user can't
use it at all. You can try 'readonly' but that is only supposed to work
with type text or password, results may vary.
code :
<input type="file" name="theFile" ContentEditable="false" size="40">
contenteditable is a Microsoft proprietary attribute, it is not part of
HTML 4. It is not supposed to be available for input type=file, only for:
"...INPUT type=button, INPUT type=password, INPUT type=radio,
INPUT type=reset, INPUT type=submit, INPUT type=text..."
<URL:http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/contentEditable.asp>
The fact that it 'works' means that there is either a bug in IE or the
MSDN documentation is wrong.
--
Rob