IIS ASP - Displaying Message box!

This is Interesting: Free IT Magazines  
Home > Archive > IIS ASP > June 2004 > Displaying Message box!





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Displaying Message box!
Abdul Azeem

2004-06-28, 8:55 am

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

2004-06-28, 8:55 am

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" <abdulazeem@abc.com> wrote in message
news:%23eka7qQXEHA.3564@TK2MSFTNGP11.phx.gbl...
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

2004-06-29, 3:16 am

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





"Lance Wynn" <lance_wynn@N.O.S.P.A.M.hotmail.com> wrote in message
news:ezJzY0QXEHA.3716@TK2MSFTNGP10.phx.gbl...
> 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" <abdulazeem@abc.com> wrote in message
> news:%23eka7qQXEHA.3564@TK2MSFTNGP11.phx.gbl...
> 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.
>
>
>



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com