|
-
Mar 26th, 2001, 09:20 PM
#1
Thread Starter
Addicted Member
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
-
Mar 27th, 2001, 10:36 AM
#2
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.
-
Mar 27th, 2001, 10:41 AM
#3
Lively Member
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
-
Mar 27th, 2001, 09:06 PM
#4
Thread Starter
Addicted Member
Thanks Cander and harsoni
Keiko
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|