Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Q1455 In side a JavaScript function (for Netscape Navigator 3.04) when I do document.form.file.value where file is of type input="file" with enctype="multipart/form-data" it does not return any value.

irt.org | Knowledge Base | JavaScript | Bugs | Q1455 [ previous next ]

Q1455 In side a JavaScript function (for Netscape Navigator 3.04) when I do document.form.file.value where file is of type input="file" with enctype="multipart/form-data" it does not return any value.

It is a known bug, and you are lucky, it has a workaround:

<script language="JavaScript>
function showFile(theForm) {
    theForm.file1.focus();
    theForm.file1.blur();
    Test = '' + theForm.file1.value;
    alert(Test);
}
//--></script>

<form name=uploadform enctype="multipart/form-data">
<input type="file" name="file1">
<input type="button" value="Click" onClick="showFile(this.form)">
</form>

Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.