Displaying Message box!

Discussion in 'ASP General' started by Abdul Azeem, Jun 28, 2004.

  1. Abdul Azeem

    Abdul Azeem Guest

    Hi All,

    I have a requirement to display a message and then redirect the controls to
    some file, I tried with the below method but its not working, where as If I
    use server.transfer or server.execute it works but I cant give relative Url
    (it will dynamically genrate), If any one has an alternate way, pls respond.

    ShowMessage("Hello World")

    Sub ShowMessage(sMessage)
    Response.Write "<script> alert("& Chr(34) & sMessage & Chr(34) &" );
    </script>"
    Response.redirect "xyz.asp"
    End Sub

    Thanks in Advance,
    Mohammed.
     
    Abdul Azeem, Jun 28, 2004
    #1
    1. Advertising

  2. Abdul Azeem

    Lance Wynn Guest

    You could use all Client Side code, this way it will wait for the user to
    respond to redirect. Otherwise, it's probably redirecting before the alert
    is presented to the user:

    ShowMessage("Hello World")

    Sub ShowMessage(sMessage)
    %>
    <script>
    alert("<%= sMessage %>" )
    document.location="xyz.asp"
    </script>
    <%
    End Sub



    "Abdul Azeem" <> wrote in message
    news:%...
    Hi All,

    I have a requirement to display a message and then redirect the controls to
    some file, I tried with the below method but its not working, where as If I
    use server.transfer or server.execute it works but I cant give relative Url
    (it will dynamically genrate), If any one has an alternate way, pls respond.

    ShowMessage("Hello World")

    Sub ShowMessage(sMessage)
    Response.Write "<script> alert("& Chr(34) & sMessage & Chr(34) &" );
    </script>"
    Response.redirect "xyz.asp"
    End Sub

    Thanks in Advance,
    Mohammed.
     
    Lance Wynn, Jun 28, 2004
    #2
    1. Advertising

  3. Abdul Azeem

    Abdul Azeem Guest

    Thanks a lot dear, you solved my problem.
    Thanks once again..
    Mohammed.





    "Lance Wynn" <> wrote in message
    news:...
    > You could use all Client Side code, this way it will wait for the user to
    > respond to redirect. Otherwise, it's probably redirecting before the

    alert
    > is presented to the user:
    >
    > ShowMessage("Hello World")
    >
    > Sub ShowMessage(sMessage)
    > %>
    > <script>
    > alert("<%= sMessage %>" )
    > document.location="xyz.asp"
    > </script>
    > <%
    > End Sub
    >
    >
    >
    > "Abdul Azeem" <> wrote in message
    > news:%...
    > Hi All,
    >
    > I have a requirement to display a message and then redirect the controls

    to
    > some file, I tried with the below method but its not working, where as If

    I
    > use server.transfer or server.execute it works but I cant give relative

    Url
    > (it will dynamically genrate), If any one has an alternate way, pls

    respond.
    >
    > ShowMessage("Hello World")
    >
    > Sub ShowMessage(sMessage)
    > Response.Write "<script> alert("& Chr(34) & sMessage & Chr(34) &" );
    > </script>"
    > Response.redirect "xyz.asp"
    > End Sub
    >
    > Thanks in Advance,
    > Mohammed.
    >
    >
    >
     
    Abdul Azeem, Jun 29, 2004
    #3
    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. Sanjay Kedare

    Displaying server side message box

    Sanjay Kedare, Aug 22, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    2,433
    Sanjay Kedare
    Aug 22, 2003
  2. =?Utf-8?B?TWlrZSBNb29yZQ==?=

    Show Message Box Not Displaying

    =?Utf-8?B?TWlrZSBNb29yZQ==?=, Dec 7, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    401
    =?Utf-8?B?QXJuZQ==?=
    Dec 7, 2004
  3. =?Utf-8?B?TWlrZSBNb29yZQ==?=

    Validation Summary Message Box Not Displaying

    =?Utf-8?B?TWlrZSBNb29yZQ==?=, Dec 7, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    5,013
    Patrick Olurotimi Ige
    Dec 9, 2004
  4. Gnarlodious
    Replies:
    4
    Views:
    17,683
    elizas
    May 5, 2010
  5. Replies:
    5
    Views:
    226
Loading...

Share This Page