Passing Parameter between Javascript and VBScript
Hi
Can anyone help me pls.
New to javascript. I'm trying to call a VBSCript function which accepts parameters as arguments. The VBSCript function is then called from Javascript where the values are passed back.
I can't get it to work for some reason
a) syntax is wrong
b) no values are passed back i.e the parameters are empty when
i try to display the values passed in or returned
example:
---------
VBSCript
Function GetID(ID)
Dim ReturnVal
'do something.........
response.write ID
ReturnVal = 123
' return a value back
GetID = ReturnVal
End Function
Javascript
function SwapCheckBox()
{
var x;
var ID = document.ll.hdnID.value;
// call vbscipt function
x = <%=GetID(ID)%>;
// display returned value
alert(x);
}
Your help will be much appreciated.
|