MsgBox

Discussion in 'ASP General' started by Lakrom, Dec 21, 2004.

  1. Lakrom

    Lakrom Guest

    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
    Lakrom, Dec 21, 2004
    #1
    1. Advertising

  2. Lakrom

    Steven Burn Guest

    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" <> wrote in message
    news:4fUxd.2016$...
    > 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
    >
    >
    Steven Burn, Dec 21, 2004
    #2
    1. Advertising

  3. Lakrom

    Phill. W Guest

    "Lakrom" <> wrote in message
    news:4fUxd.2016$...
    > 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.
    Phill. W, Dec 21, 2004
    #3
  4. Lakrom

    Lakrom Guest

    Thanks, is been a much help really thanks.

    "Lakrom" <> escribió en el mensaje
    news:4fUxd.2016$...
    > 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
    >
    >
    Lakrom, Dec 21, 2004
    #4
  5. Lakrom

    Steven Burn Guest

    No problem

    --

    Regards

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

    Keeping it FREE!


    "Lakrom" <> wrote in message
    news:92Vxd.2020$...
    > Thanks, is been a much help really thanks.
    >
    > "Lakrom" <> escribió en el mensaje
    > news:4fUxd.2016$...
    > > 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
    > >
    > >

    >
    >
    Steven Burn, Dec 21, 2004
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mark Newby
    Replies:
    1
    Views:
    1,685
  2. Mendhak [MVP]
    Replies:
    0
    Views:
    567
    Mendhak [MVP]
    May 15, 2005
  3. Emil Kvarnhammar

    Re: msgbox?

    Emil Kvarnhammar, Jul 16, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    552
    Salim Afþar
    Jul 16, 2003
  4. Salim Afþar

    Re: Grid msgbox?

    Salim Afþar, Jul 16, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    389
    Salim Afþar
    Jul 16, 2003
  5. Chuck Traywick

    MSGBOX Example

    Chuck Traywick, Jul 29, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    3,253
    Steve C. Orr, MCSD
    Jul 29, 2003
Loading...

Share This Page