I am using the below code on an intranet site. The javascript drop down menu functions fine and runs the relevant programs.
The second onclick command gives a script error – ‘missing’)” and I cannot see why.
<script type=”text/javascript”>
fso = new ActiveXObject(“Scripting.FileSystemObject”);
function RunProgram(Program_Path) {
Default_Value = Program_Path.match(new RegExp(“Default”, “i”))
if (Default_Value) {
} else {
new ActiveXObject(“WScript.Shell”).Run(Program_Path,3,false)
}
}
</script>
<select onchange=”RunProgram(this.value)”>
<option value=”Default” selected>Launch EMIS/MENTOR</option>
<option value=”C:
<option value=”C:
</select>
<td rowspan=”3″><A href=”javascript:// “onclick=”RunProgram(C:\progra~1\mentor~1\mentor.exe)”><img name=”access_page_allstaff_r8_c6″ src=”../grph_files/sliced_images/access_page_allstaff_r8_c6.gif” width=”93″ height=”51″ border=”0″ alt=””></a></td>
<td><img src=”../grph_files/sliced_images/spacer.gif” width=”1″ height=”6″ border=”0″ alt=””></td>
</tr>
Can anyone help me please?
Thank you