faqts : Computers : Programming : Languages : Asp : ASP/VBScript : Common Problems

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

21 of 34 people (62%) answered Yes
Recently 5 of 10 people (50%) answered Yes

Entry

How can I use a vb script variable in a javascript function?

Jul 22nd, 2000 00:45
unknown unknown, Darren Hoefgen


function fubar(<%=somevbvariable%>, <%=othervbvariable%>)
{
...
    javascript code here
...
}
end function
since VBScript is executed at the server and JavaScript is executed at 
the browser, you can put VBScript code in you JavaScript function 
exactly like you put VBScript within you HTML
the browser won't know the diff



© 1999-2004 Synop Pty Ltd