Hello to all. This is my first post, and i am very new at this, so please be kind. I have a webpage that is primarily made in perl. i am able to add html code into it (or some other languages as well). all I am trying to do is add a button to take remote control of a pc that is in our list. When I run the following code in Internet Explorer, I get nothing. I don't get anything in Firefox either, but when i look at the Error Console, I get the error "missing ; before statement as soon as i start the code. When i click the button, I get runApp (the name of my function) is not defined. here is my code:
[HTML]<input type="button" name="button1" value="Remote Control" onClick="runApp()" />
<script language="javascript" type="text/javascript">
function runapp()
{
var shell = new ActiveXObject("WScript.shell");
dim strpc
strpc = "pcxxxx"
Set WshShell = wscript.CreateObject("WScript.Shell")
strCommand = """c:\remote\guest\ngstw32.exe"" " & strpc
wscript.echo strCommand
WshShell.Run strCommand
}
</script>
[/HTML]
Like I said, I am very new at this, so please, any help would be appreciated. One more note, where it says strpc = "pcxxxx", I just threw that in for testing. i am actually picking a variable from the page that i am looking to put the button on. if anybody can let me know how i could better have a button that would run the remote control program and pick up the variable from the page so that it just takes remote of the pc. If this is sounding like a bad thing, it's not. We are purchasing a new Help Desk ticket system from Numara, and I wanted to be able to add this function into it. we support thousands of pc's, so this should make it easier. thank you for any help you can give me. If I have posted this in the wrong forum, please let me know. Thank you all!
Dave