MsgBox

L

Lakrom

Hi to all, how to put msgbox in this asp page, this send me a message
Denied permission: 'MsgBox'
<% Set Conn=server.createobject("ADODB.connection")
Conn.open application("StrConRuta")
set rs = Conn.Execute("select rut from encuestarutaparaiso where rut='" &
rut_usuario & "'")
if not rs.eof then
msgbox "Gracias por tu interes pera ya has respondido esta encuesta"
end if
Set rs= Conn.Execute("Select * from tabladatos where rut = '" & rut_usuario
& "'")
if rut_usuario<>"-" then
if not rs.eof then
session("rut")=rut_usuario
response.redirect("encuesta.asp")
else
msgbox "Tu no estás registrado"
response.Redirect("index.asp")
end if
else
msgbox "Tu no eres usuario"
response.Redirect("index.asp")
end if
Conn.Close
set rs = nothing
%>
 
S

Steven Burn

You can't call a message box server side.... you need to put it on the
client side.

if not rs.eof then
%>
<script language="VBScript">
msgbox "Gracias por tu interes pera ya has respondido esta encuesta"
</script>
<%
end if

Or if you prefer, response.write the above out to save going from ASP > HTML

--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!
 
P

Phill. W

Lakrom said:
how to put msgbox in this asp page, this send me a message
Denied permission: 'MsgBox'

Short answer - You can't.

Longer answer - You can't; and for a very Good Reason.

The MsgBox, running as it would be in *Server-Side* code ("Active
*Server* Page" being a clue) would [try to] appear on desktop of the
web server machine - probably locked away in some dark corner of
a machine room into which only the cleaner's ever venture and there
certainly /won't/ be anyone there to click "OK" to get rid of the
MsgBox. (This would also stall the entire ASP-processing thread with
IIS as well so you'd effectively kill all ASP's on that web server).

Regards,
Phill W.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top