1. With your particular example, will the response from your msgbox ever be
anything but 1? You don't leave the user many options when you have only
"vbOK"
2. Since your usage of VBScript in the browser already indicates you are
into doing things in an unorthodox way (said with a "<g>" of course!), you
could do something like so:
yourpage.asp:
<%
Dim pop_up_text
pop_up_text = "All your base are belong to us"
%>
<img id="x" style="display:none;" />
<script type="text/javascript">
//sorry, I cannot bring myself to use vbscript,
if(confirm('<%=pop_up_text%>')) {
var o = document.getElementById('x');
x.src =
'./process.asp?user=IdentifiedSomehow&m=<%=Server.URL Encode(pop_up_text)%>';
}
</script>
process.asp:
<%
Dim sUser, sMessage, oCDO
sUser = Request.Querystring("user")
sMessage = Request.Querystring("m")
Set oCDO = CreateObject("CDO.Message")
oCDO.From = "yo**@yourdomain.kom"
oCDO.To = "yo*@yourdomain.kom"
oCDO.Subject = "User clicked OK"
oCDO.TextBody = sUser & " clicked OK to a prompt of " & sMessage
oCDO.Send
Set oCDO = Nothing
%>
Ray at work
"JT" <jt@nospam.com> wrote in message
news:eD**************@TK2MSFTNGP09.phx.gbl...
but isn't there a way to somehow do it along the lines of what is
discussed
in this article?
http://www.aspfaq.com/show.asp?id=2198
"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcom> wrote in message
news:OW**************@tk2msftngp13.phx.gbl... JT wrote: > im trying to use the following code to log whenever a user clicks
> through this particlular message box - however, this currently logs
> regardless of whether or not the message box was clicked - im
> assuming this is because the server-side code can't see the client
> side if condition. but how can i set the varMsgBox variable as a
> server-side variable?
>
You can't. All server-side code runs before client-side code is
processed.
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.