Hi, I have the following combo box source code:
How can I make the form ask the users if they want to open the selected file with a program or download it instead of opening the file in the web browser?
Thank you in advance!
Code:
<script type="text/javascript">
function go1(){
if (document.selecter1.select1.options[document.selecter1.select1.selectedIndex].value != "none") {
location = document.selecter1.select1.options[document.selecter1.select1.selectedIndex].value
}
}
//-->
</script>
<script type="text/javascript">
<!--
document.write('<form name="selecter1"><select name="select1" size=1>');
document.write('<option value=none>Select');
document.write('<option value=none>--------------------');
document.write('<option value="FILE.PDF">File');
document.write('<option value="FILE.PDF">File');
document.write('<option value="FILE.PDF">File');
document.write('</select>');
document.write(' <input type="button" value="Go" onclick="go1()">');
document.write('</form>');
// end hiding contents -->
</script>
Thank you in advance!
Comment