Looking for some sample code here. What I'm trying to do is have a form page that gives users a combo box with 3 choices in the combo box.
The idea is that the user picks one of the three in the combo box and then has a choice of two command buttons. The first allows them to view a pdf file.
The second would allow them to actually download the file to their machine, kind of like when you click on a href link that points to a file. I've written the following:
here is the combo box
<select name="lstFileName">
<option value="forms/ArchEng.pdf" selected> Architects and Engineers Application</option>
<option value="forms/EmpPracApplication.pdf">Employment Practices Liability and Discrimination Insurance Application</option>
<option value="forms/EmpPracIndicationSheet.pdf"> Employment Practices Liability and Discrimination Insurance Indication Sheet </option>
here is the first button
<input type="button" value="View/Print Form" id="btnViewForm" name="btnViewForm" onclick="window.open (lstFileName.optionslstFileName.selectedIndex].value)"><BR><BR><STRONG>- Or - </STRONG>
here is the second button
<input type="button" value="Download Form" id="btnDownloadForm" name="btnDownloadForm" onclick="????????">
The first button works fine, but I'm stumped on how I can capture the user's choice in the combo box and then tell the page to download on button #2. Is there a "download" method somewhere that I can manipulate somewhere?
How much more water would there be in the ocean if it weren't for sponges?
The idea is that the user picks one of the three in the combo box and then has a choice of two command buttons. The first allows them to view a pdf file.
The second would allow them to actually download the file to their machine, kind of like when you click on a href link that points to a file. I've written the following:
here is the combo box
<select name="lstFileName">
<option value="forms/ArchEng.pdf" selected> Architects and Engineers Application</option>
<option value="forms/EmpPracApplication.pdf">Employment Practices Liability and Discrimination Insurance Application</option>
<option value="forms/EmpPracIndicationSheet.pdf"> Employment Practices Liability and Discrimination Insurance Indication Sheet </option>
here is the first button
<input type="button" value="View/Print Form" id="btnViewForm" name="btnViewForm" onclick="window.open (lstFileName.optionslstFileName.selectedIndex].value)"><BR><BR><STRONG>- Or - </STRONG>
here is the second button
<input type="button" value="Download Form" id="btnDownloadForm" name="btnDownloadForm" onclick="????????">
The first button works fine, but I'm stumped on how I can capture the user's choice in the combo box and then tell the page to download on button #2. Is there a "download" method somewhere that I can manipulate somewhere?
How much more water would there be in the ocean if it weren't for sponges?