No, not really. See, with the way ASP works, there is no "built-in" way to
interact between client and server. How things work is:
1. Browser enters URL, which in turn sends an http request to a server.
2. Server receives request, loads the page, runs any ASP code that may be
in it.
3. After all the code is run or a Response.End is reached, the resultant
HTML is sent back to the client (browser) that made the request.
So, you see, by the time your onAction (what's that?) event happens, there
is no server sitting there connected to the browser waiting for a subroutine
call. You have to have the browser make another request to the server. For
example:
<%
If Request.Querystring("choice") <> "" Then Call resposeprocess()
Sub resposeprocess()
''some code
Response.Write "Sub routine ran."
Response.Write "<br>Option chosen: " & Request.Querystring("choice")
End Sub
%>
<select name="DropDownMenu"
onchange="location.href='thispage.asp?choice='+thi s.value;">
<option value="1">Value 1</option>
<option value="2">Value 2</option>
</select
So, that's using JavaSCRIPT, which you didn't want to do, but you either
have to use that or encapsulate this in a form with a submit button that the
user will have to click on to send the new request to the server.
Ray at home
"Johan Christensson" <jo****************@telia.com> wrote in message
news:OF*************@TK2MSFTNGP14.phx.gbl...
Hi.
I'm woundering if it's possibel to transfer a OnAction value from a
drop-down box in an ASP page without having to use Java code?
I mean something like this:
<%
Sub resposeprocess
some code,......
End Sub
%>
<Select name="DropDownMenu onAction="responseprocess">
<Option value="1">Value 1</option>
<Option value="2">Value 2</option>
</Select>
Can i get holds of the value from the drop-down box and use it inte the
subroutibe?
/Johan Ch