jlm661
asked on
run client side program
hi...i have a perl script which runs a program on the server and then i would like it to run a program (pro/engineer) on the client's machine...what commands should i use? if i were running pro/e from the command line i would type
c:/proewildfire c:/TEMP/trial.txt
thanks!
jess
c:/proewildfire c:/TEMP/trial.txt
thanks!
jess
ASKER
okay here is my cgi code right now
#!/usr/bin/perl -wT
use CGI;
$ENV{'PATH'} = '/usr/sbin:/usr/bin';
print "Content-type: text/plain\n\n";
$dir = "/home/edog.1/jlm661/nsga/ GA/";
chdir $dir or die "Can't cd to $changedir: $!";
print "changed dir okay\n";
$result2 = system("./deviation1");
if ($result2)
{
print "Error: Couldn't run $result2: $!";
}
sub dienice {
my($msg) = @_;
print "<h2>Error</h2>\n";
print $msg;
exit;
}
so where would i put the javascript??
#!/usr/bin/perl -wT
use CGI;
$ENV{'PATH'} = '/usr/sbin:/usr/bin';
print "Content-type: text/plain\n\n";
$dir = "/home/edog.1/jlm661/nsga/
chdir $dir or die "Can't cd to $changedir: $!";
print "changed dir okay\n";
$result2 = system("./deviation1");
if ($result2)
{
print "Error: Couldn't run $result2: $!";
}
sub dienice {
my($msg) = @_;
print "<h2>Error</h2>\n";
print $msg;
exit;
}
so where would i put the javascript??
you can say,
print "<script> var ws = new ActiveXObject(\"WScript.Sh
anywhere in the script.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
sweet...thank you! i will try it tomorrow and let you know how it goes!
HTANKS AGAIN!!!
jess
HTANKS AGAIN!!!
jess
You'll need Content-type: text/html not text/plain to run Javascript
Be aware that any Javascript/ActiveX solution is going to be very limited in its application as it will depend on things such as browser version, OS, browser settings and security settings.
You can run a javascript
<script>
var ws = new ActiveXObject("WScript.She
ws.Exec("c:/proewildfire c:/TEMP/trial.txt")
</script>