Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Sep 18, 2007 09:17 AM by windows_mss
Sep 12, 2007 08:58 PM|LINK
the alert never shows up. I tried changing the endReponse to true and false, it did not work. Any suggestions?
Sep 12, 2007 09:43 PM|LINK
You need to do the redirect from the client
Sep 18, 2007 09:02 AM|LINK
Based on my understanding, you have a page for sending mail. If sending the mail successfully, you want to redirect to the home page and then popup a message box to tell client that the mail has been sent successfully. The concern is how to popup the message
box after redirect. If I have misunderstood your concern, please let me know.
For this scenario, we can add a function in the home page to verify if we need to show the message. If the mail has been sent successfully, redirect to the home page with a parameter, for example: redirect to “home.aspx?Mail=true”. Then in the home
page onload event handler, check the parameter and estimate if we need popup the message.
For your reference, please refer to the following code. I hope it is helpful to you.
<html xmlns="http://www.w3.org/1999/xhtml" >
var queryString = document.location.search.replace('?','');
var parameters = queryString.split('&');
for (i=0; i<parameters.length; i++)
if (parameters[i].substring(0,5) == 'Mail=')
if(parameters[i].replace('Mail=','') == 'true')
alert('mail has been sent successfully');
<form id="form1" runat="server">
this is the home page
Sep 18, 2007 09:14 AM|LINK
Try with this code:
Sep 18, 2007 09:17 AM|LINK
Try This If You Are Using Ajax Enabled Site
Change The Index.aspx to any aspx page according to your need