<INPUT TYPE="file" NAME="f1" style="display:none;" onchange="doLoadFile()">
<input type="button" value="Select a File" onclick="doSelect();">
<textarea name="content" id="content" cols="60" rows="20"></textarea>
<SCRIPT LANGUAGE="JavaScript">
<!--
function doSelect(){
document.getElementById("f1").click();
}
function doLoadFile(){
try{
var file = document.getElementById("f1");
if(file == null){
return;
}
var fso = new ActiveXObject("Scripting.FileSystemObject");
var fin = fso.OpenTextFile(file.value,1,false);
document.getElementById("content").value = fin.ReadAll();
fin.Close(); fin = null;
fso = null;
}
catch(e){
alert(e.description);
}
}
//-->
</SCRIPT>