-
Dear all,
Does anyone know how to define a procedure/sub/function in ASP?
For example file name Test.asp
(this code does not work):
<%
Response.Write ("<input type=button value=Answer name=cmdAnswer onClick='Answer'>")
Sub Answer()
' code
End Sub
%>
Thanks in advance
Keiko
-
The onclick will only call a sub/function on the client side so that will not work becuase the sub you wrote is server side.
-
Put this function in the client script..
<%
Response.Write ("<input type=button value=Answer name=cmdAnswer onClick='Answer'>")
%>
.....
<SCRIPT language=VBSCRIPT>
Sub Answer()
' code
End Sub
</SCRIPT>
Sonia
-
Thanks Cander and harsoni
Keiko