Ik heb hier een stukje code waarmee ik een programma opstart, Maar hoe geef ik hier een parameter mee voor het opstarten van een programma?
Alvast Bedankt
Code:
<HTML>
<HEAD>
<link rel="stylesheet" href="style.css">
<script>
d=document; var bgcol = location.search.substring(1); col = bgcol? bgcol : '#000000';
d.write('<style>body { scrollbar-face-color: '+col+'; scrollbar-shadow-color: '+col+
'; scrollbar-highlight-color: '+col+'; scrollbar-3dlight-color: '+col+'; scrollbar-darkshadow-color: '+col+
'; scrollbar-track-color: '+col+'; scrollbar-arrow-color: #ffffff } </style>');
</script>
<Script language="JavaScript">
<!--
function executeCommands(form)
{
var oShell = new ActiveXObject("Shell.Application");
var index=form.select.selectedIndex;
if (form.select.options[index].value != "0")
{
commandtoRun = form.select.options[index].value;
}
oShell.ShellExecute(commandtoRun, "", "", "open", "1");
}
</script>
<title></title>
</HEAD>
<script>d.write('<BODY BGCOLOR='+col+'>');</script>
<BODY bgcolor="#000000">
<FORM NAME="form1">
<p style="word-spacing: 0; text-indent: 0; line-height: 100%; margin: 0"><b>
<font face="Verdana" size="1">My Programs</font></b>
<p style="word-spacing: 0; text-indent: 0; line-height: 100%; margin: 0"><br>
<SELECT NAME="select" SIZE="1">
<OPTION VALUE="">-----Choose a Selection-----
<OPTION VALUE="C:\Active Desktop\Project1.exe">List Files</OPTION>
<OPTION VALUE="C:\Active Desktop\Project1.exe">Config</OPTION>
<OPTION VALUE="C:\Active Desktop\Project1.exe">Run Files</OPTION>
</SELECT> <input type="button" value="Go" onClick="executeCommands(form)">
</p>
</FORM>
<FORM NAME="form2">
<p style="word-spacing: 0; text-indent: 0; line-height: 100%; margin: 0"><b>
<font face="Verdana" size="1">Tools</font></b>
<p style="word-spacing: 0; text-indent: 0; line-height: 100%; margin: 0"><br>
<SELECT NAME="select" SIZE="1">
<OPTION VALUE="">-----Choose a Selection-----
<OPTION VALUE="C:\Project.exe">Test<List Files</OPTION>
</SELECT> <input type="button" value="Go" onClick="executeCommands(form)">
</p>
</FORM>
</BODY>
</HTML>
Alvast Bedankt