i need to call two function on a single click event. and also the functions shud get executed sequentially. i tried click me . but its not working.its not calling any of the functions. here is the complete code. sorry for formatting.
<html>
<head>
<script type="text/vbscript">
function copy()
Dim WshShell, oExec,g,h
h="D:\d"
g="xcopy " & h & " " & "D:\y\ /E"
Set WshShell = CreateObject("WScript.Shell")
Set oExec = WshShell.Exec(g)
Do While oExec.Status = 0
WScript.Sleep 100
Loop
WScript.Echo oExec.Status
end function
function zip()
Dim WshShel, oExe
Set WshShel = CreateObject("WScript.Shell")
Set oExe = WshShel.Exec("cmd /c cd D:\d & D: & winzip32.exe -min -a D:\a")
Do While oExe.Status = 0
WScript.Sleep 100
Loop
WScript.Echo oExe.Status
end function
</script>
</head>
<body>
<button onclick="copy();zip();"> click me </button>
</body>
</html>
any help is appreciated.