Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling JavaScript from VBScript CLIENT SIDE

Status
Not open for further replies.

webemphasis

Programmer
Oct 21, 2001
1
GB
Hi I want to use vbscript client side to call a JavaScript function. Why? I hear you ask. I want to use the advanced features of the vbscript message box and call different JavaScript depending upon the returnvalue.

Hope you can help!

Tom
 
If you want to call a client side javascript function FROM a client side vbscript then try something like this:

<SCRIPT LANGUAGE=&quot;VBScript&quot;>
dim x
x = 0
function test
    x = x + 1
    blah(x)
End function
</Script>

<Script language=&quot;javascript&quot;>
<!--
function blah()
{
    alert(x);
}
//-->
</script>

In the above example I called the vbscript from a button on the page and the vbscript is passing a variable to the javascript.

Let me know if you wanted server-side vb to call a client side javascript.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top