Assumuing you have a dropdown with the id of "lstFiles" with the friendly name showing and the path to the file in the option value you need the button onclick call a function like:
Code:
<input type="button" value="Download File" onclick="downloadFile();">
function downloadFile()
{
var oLst = documentGetElementById("lstFiles");
var iIndex = oLst.selectedIndex
if (iIndex > -1)
{
var sPath = oLst.options[iIndex].value;
window.open(sPath, "");
}
else
{
alert("Please select a file.");
}
}
If the file is a known type that the browser knows how to display it will come up displayed either in the browser or in the relevant application depending on how the client is configuered. If it is an unknown type the uswer will get the download or save dialog box. If you wish to always have the dialog box, even for files such as .txt. Then you will need to set the response headers using a server-side technology such as ASP. Look on msdn.com at:
http://support.microsoft.com:80/supp...NoWebContent=1
--
Joe