I have a form that submits to a different page to the one it is on. I want to catch the onsubmit for the form and perfom some VBScript code.
Am I right in thinking like with Java code in a JSP, everything in <% %> will be evaluated before the html is rendered?
Here is a brief overview of my problem:
<form id="frm1" method="post" action="otherSite" onsubmit="<% logFormSubmit "submitted"%>">
.
.
.
</form>
The code in the onsubmit calls a sub, logFormSubmit on another asp page that takes a string argument as the action to be logged. The problem here is this happens before the form is submitted, because the <% %> code is evaluated before any html, or at least that's what I think is happening.
I can't log from he page the form submits to. Any suggestions on only calling the logFormSubmit sub when the form is submitted?