This topic is locked

Insert VBScript

1/9/2008 9:03:13 AM
PHPRunner General questions
W
WhoFlungDung author

Hi Guys
Apologies if this has been asked before but have searched PHPRunner forum in vain
I have managed to include a textbox and button on a page with the following code
<INPUT type=textbox value="{$row.1TargetPC_value}" name=message><INPUT onclick=Run(message.value) type=button value=Run>
this works fine
but when I try to include the following VBScript
<script Language="VBScript">

<!--

Function Run(mcName)

Set wobject = createobject("wscript.shell")

wobject.run "cmd /c \\PCBlah\c$\Run.vbs " & mcName &" >c:\test.txt", 0, True

Msgbox "Run Complete on " & mcName

End Function

-->

</SCRIPT>
I get load errors - even though the script works !
I have included the script in the head - not that it seems to make a difference - any ideas ??

G
gr8hands 1/11/2008

You need to have your entire script between the {literal} and {/literal} codes which appear right after <BODY> at the top of your page in HTML view.