Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Calling VBScript from JavaScript or vice versa?

Is it possible to call a VBScript function from a JavaScript call, or alternately call JavaScript from a VBScript call?

like image 902
GoingTharn Avatar asked Jan 21 '09 16:01

GoingTharn


1 Answers

Calling a VBScript function from Javascript

Your VBScript:

Function myVBFunction()
  ' here comes your vbscript code
End Function

Your Javascript:

function myJavascriptFunction(){
  myVBFunction();           // calls the vbs function
}
window.onload = myJavascriptFunction;

Calling a Javascript function from VBScript

Function myVBFunction()
  myJavascriptFunction()  
End Function
like image 153
bulevardi Avatar answered Oct 16 '22 01:10

bulevardi