I can't find this person's reply to your message....so i'll answer you.
Since ASP code is executed on the server, and it gets processed and stripped out before it sends the results to the client....you cannot have a client-side event call an ASP function.
You could emulate this by including a querystring variable that would execute the sub if its turned on, and then have ther button reload the page with the sub routine executing. So you could make the button call this link:
mypage.asp?CallRoutine=1
and then in your mypage.asp put this code:
<%
If request.querystring("CallRoutine" = 1 then
MyRoutine
End if
%>
Not the most elegant way to do something, depending on what you're doing, it might be better to use client-side scripts.
I thought the query related to something like simple field validation at the client side - rather than getting the client to ask the server to perform something... Tim,
what is it you're after?
My original reply to your query has gone way down the board, so I'll repost it here in a moment!
Tim,
below are two scraps of code for a button.
With javascript (I've assumed you mean javascript for the client side) you must watch the case v. carefully.
This bit is the code to execute
[tt]
<SCRIPT LANGUAGE="JavaScript">
function java_close_window(){
window.close();
}
</SCRIPT>
[/tt]
this defines the button
[tt]
<input type="button" value="Yes" onClick="java_close_window();">
[/tt]
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.