[Javascript] variables between VBScript and JavaScript

Peter Brunone peter at brunone.com
Fri May 18 13:34:40 CDT 2001


    If you mean that both are client-side scripts, you should be able to use
a form field as a temporary holding space.  Of course, change notification
could be a problem.

    These scripts contain a JS function called by VBS, and a VBS function
called by JS.  I just threw it together, and I'm getting an error when JS
tries to call the VBS function, but the other one works just fine.  Maybe
you can play with it and find out why, but I'm guessing that JavaScript is
going to have a problem calling the other stuff.  Still, one way is better
than none...

<SCRIPT LANGUAGE="JavaScript">
function getThis(param) {
 param = " booga " + param + " booga ";
 return param;
 }

alert(vbScriptFunction("Hello!"));
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">

alert("VBScript passed this value to JavaScript:  " + getThis("ooga"))

Function vbScriptFunction(param)
 vbScriptFunction = "JavaScript called a VBScript function and got this
back: " & param
End Function
</SCRIPT>


----- Original Message -----
From: "Scott Lowder" <ScottL at pop.ucr.edu>
To: <javascript at LaTech.edu>
Sent: Friday, May 18, 2001 1:11 PM
Subject: [Javascript] variables between VBScript and JavaScript


> Hello,
> Is there a way I can pass a variable from VBScript to a JavaScript and
vice
> versa?
>
> Thanks,
> Scott
>
>
>
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> http://www.LaTech.edu/mailman/listinfo/javascript
>





More information about the Javascript mailing list