The following was written after the DOC statement and before the HTML opening tag.
Sub mysub() ' This is a sub that calls another sub. ' There are two other ways to call a sub: one, on an event; two, from within another set of script tags. response.write ("Hello World!!! & "<br />") WriteSub() End Sub Sub WriteSub() response.write ("This is wriiten from another sub that is called in the current sub.") End Sub
Could not use the onclick event handler to call the ASP sub procedure. Code would stop and not run at this point.
It was written as onclick=<%=mysub() %> .
The next line is a sub procedure call. It is a call placed within the ASP delimiters.
<% mysub() %>
This is wriiten from another sub that is called in the current sub.
The last line above was written in the page's body after the procedures call. The writeSub is first called in the first sub, mysub which is shown above.
ASP will not call a sub with an onclick event. So, use JavaScript for the button to work.
Return to Table of Contents
DELAWARE'S MIDDLETOWN ODESSA AND TOWNSEND AREA