tags:

views:

13

answers:

1

x="D:\d"
y="ehgfh"
button onclick="zips (x,y)" id=button1 name=button1>clickme

function zips(x,y)
alert(y)
dim shell,z
z="c.bat " & x

set shell=createobject("wscript.shell")

shell.Run z, 1, true
shell.Run "a.bat", 1, true
set shell=nothing
end function

how to eliminate the error? any help is really appriciated.

+1  A: 

VScript doesn't support using parenthesis when calling functions. Instead of using:

button onclick="zips (x,y)"

You should use:

button onclick="zips x, y"

Or use the Call statement, which does support the use of parenthesis:

button onclick="Call zips(x,y)"
Prutswonder
thanks a lot. call works :)
sushant