By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,656 Members | 1,027 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,656 IT Pros & Developers. It's quick & easy.

MsgBox

P: n/a
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
%>

--
Marco Antonio Artus S.
Lakromsoft INC.
09-9594663
Jul 22 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
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
ASP etc.
--

Regards

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

Keeping it FREE!
"Lakrom" <la****@terra.cl> wrote in message
news:4f*****************@jagger.tie.cl... 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
%>

--
Marco Antonio Artus S.
Lakromsoft INC.
09-9594663

Jul 22 '05 #2

P: n/a
"Lakrom" <la****@terra.cl> wrote in message
news:4f*****************@jagger.tie.cl...
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.
Jul 22 '05 #3

P: n/a
Thanks, is been a much help really thanks.

"Lakrom" <la****@terra.cl> escribió en el mensaje
news:4f*****************@jagger.tie.cl...
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
%>

--
Marco Antonio Artus S.
Lakromsoft INC.
09-9594663

Jul 22 '05 #4

P: n/a
No problem

--

Regards

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

Keeping it FREE!
"Lakrom" <la****@terra.cl> wrote in message
news:92*****************@jagger.tie.cl...
Thanks, is been a much help really thanks.

"Lakrom" <la****@terra.cl> escribió en el mensaje
news:4f*****************@jagger.tie.cl...
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
%>

--
Marco Antonio Artus S.
Lakromsoft INC.
09-9594663


Jul 22 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.