<script>
<%
if something=something then
response.write "call your function here"
else
response.write "call a different function here"
end if
%>
</script>
but technically you can't because javascript is client-side and asp is server-side
for js i believe you can use the <%@ language="javascript" %>
at the very top of the page and call it that way....otherwise...you can use vbs like this
Code:
<html>
<head>
<%
sub vbproc(num1,num2)
response.write(num1*num2)
end sub
%>
</head>
<body>
<p>
You can call a procedure like this:
</p>
<p>
Result: <%call vbproc(3,4)%>
</p>
<p>
Or, like this:
</p>
<p>
Result: <%vbproc 3,4%>
</p>
</body>
</html>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.