Curtis wrote on 20 nov 2004 in microsoft.public.inetserver.asp.general:
Sorry if this is the wrong newsgroup in which to post.
We have an asp page on a webserver supporting asp pages.
How can we run/call a function on this page using an onclick or other
event from a control. For example, when an image is clicked or a
combobox is changed. We know how to run a javascript, but would be
nice to run an asp function.
Impossible!
ASP runs on the server BEFORE the page is submitted to the client.
The only way to execute a server function [that btw can be written in
javascript] is to send a request [for a new/same page] to the server.
========== test.asp ===========
<script runat=server language=javascript>
response.write( request.querystring('x') );
</script>
<br>
<button onclick="location.href='test.asp?x=Hello%20world'" >
Write 'Hello world' above this button
</button>
================================
ASP is not a language but a server platform for script languages,
like j[ava]script and vbscript.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress,
but let us keep the discussions in the newsgroup)