473,396 Members | 1,767 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Displaying Message box!

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.
Jul 19 '05 #1
2 2886
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" <ab********@abc.com> wrote in message
news:%2****************@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.

Jul 19 '05 #2
Thanks a lot dear, you solved my problem.
Thanks once again..
Mohammed.

"Lance Wynn" <la********@N.O.S.P.A.M.hotmail.com> wrote in message
news:ez**************@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" <ab********@abc.com> wrote in message
news:%2****************@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.

Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Paul M | last post by:
Hi there, i hope someone can help me out here.. I have a input screen where i want the user to enter text in 2 different languages, english and macedonian. How is it possible to make the...
2
by: VM | last post by:
When I display data to a Windows datagrid I usually fill the underlying table (in another class) and then, once it contains all the data, I attach it to the grid. But there are some processes that...
2
by: Walid Koleilat | last post by:
I have created an assembly and assigned a strong name to it. However I want to reference it from another application and i want its name to appear in the add reference dialog box, I think I should...
5
by: | last post by:
I have a thread which is displaying a msgbox. I need to programmatically cancel the message box if the user does click on OK. I tried to abort the thread T1.abort() , but am getting an exception....
5
by: Bill | last post by:
Hello, Could anyone post some simple code or advise me on how I can display the SSN number like *****7890 in a text box, even thought the user entered 1234567890, and the value of the variable...
4
by: mpreston | last post by:
I'm following the example from the MSDN library on how to create modal dialog boxes in C#, but something isn't working properly. If I create a modal dialog box and show it using ShowDialog(), the...
3
by: GeekyChicky79 | last post by:
Hi Everyone, I have the project below where I'm pulling out information from 1 table "Subjects", pulling the Subjects, and SubjectCode. The Subjects are displaying in the Combo Box just fine,...
1
by: rajiv Joshi | last post by:
Hi all I m displaying locations from database in the dropdownlist box using C# .Its displaying all locations properly but when i select loacation from dropdown it is always displaying first item...
33
by: buss123 | last post by:
Hi all, combo box script code was working in IE perfectly with all modes but OnChange event was not working in FireFox(editable mode, if we select valuese that combo box values r...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.