Based on your suggestion, here is my try, but I still got a running error message "Permission denied" at the line downloader.startDownload(fileName, displayFile. Can you thy this, and let me know what the problem is? thanks!
<html xmlns:msie>
<msie
ownload id="downloader" style="behavior:url(#default#download)" />
<HEAD>
<SCRIPT>
function fetchURL(url) {
if ((location.host == '' && url.indexOf(location.protocol) == -1)
||
url.indexOf(location.host) == -1)
{
netscape.security.PrivilegeManager.enablePrivilege
("UniversalConnect");
}
var dest = new java.net.URL(url);
var dis = new java.io.DataInputStream(dest.openStream());
var res = "";
while ((line = dis.readLine()) != null) {
res += line;
res += java.lang.System.getProperty("line.separator");
}
dis.close();
return res;
}
</SCRIPT>
<SCRIPT>
function loadFile (fileName) {
fileName = "file:///" + fileName.replace(/\\/g,'/');
if (document.layers) {
var i = new Image();
i.src = fileName;
var fileURL = i.src;
document.formName.file.value = fetchURL(fileURL);
}
else if (document.all && document.getElementById){
downloader.startDownload(fileName, displayFile);
}
}
function displayFile (text) {
document.formName.file.value = text;
}
</SCRIPT>
</HEAD>
<BODY>
<FORM NAME="formName">
<SELECT NAME="files"
ONCHANGE="if (this.selectedIndex > 0)
loadFile(this.options[this.selectedIndex].value);"
>
<OPTION>-- Select a file to display --
<OPTION VALUE="C:\Temp\disclaimer.html">disclaimer.html
<OPTION VALUE="test.html">test.html
</SELECT>
<BR><BR>
<TEXTAREA NAME="file" ROWS="30" COLS="80" WRAP="off"></TEXTAREA>
</FORM>
</BODY>
</HTML>