Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q1642 Can I share JavaScript and VBScript variables on the same page?

You are here: irt.org | FAQ | JavaScript | General | Q1642 [ previous next ]

All variables set outside functions in JavaScript (and all vars declared global I guess in VBScript) are available to the either script language. For example:

<script language="JavaScript"><!--
Sub vbFunction(jsvar)
  return jsvar
End Sub
</script>

<script language="JavaScript"><!--
var jsvar = 'Hello world';
var vbvar = vbFunction(jsar);
alert(vbvar);
//--></script>

Feedback on 'Q1642 Can I share JavaScript and VBScript variables on the same page?'

©2018 Martin Webb