Advertisement

03.20.2008 at 06:45AM PDT, ID: 23256846
[x]
Attachment Details

Close Popup after clicking "OK" on Javascript Alert

Asked by patelajk in Programming for ASP.NET

Tags: ASP.NET - VB

Hi

I have a JavaScript msg that appears after a record has been inserted this is also a pop-up window.

What i am having trouble with is after they click OK on the alert then it closed the pop-up, refreshes the parent window and if possible maintains the scroll position of the parent window as well (although i am not too worried about this).
 
The code that displays the alert is below. Any help is much appreciated.

Thanks againStart Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
Dim strSuccessMsg As String = "Internal Note has been Updated!!"""
Dim strError As String = "You Do Not Have Access to Update this Internal Note"
Dim script As StringBuilder = New StringBuilder("<script language=""javascript"" type=""text/javascript"">")
 
' update code 
 
' display message
script.AppendLine("function pageLoaded()")
            script.AppendLine("{ alert ('" + strSuccessMsg + "'); }")
            script.AppendLine("</scrip" & "t>")
 
            If (Not ClientScript.IsClientScriptBlockRegistered(strSuccessMsg.GetType(), "pageLoadedScript")) Then
                ClientScript.RegisterClientScriptBlock(strSuccessMsg.GetType(), "pageLoadedScript", script.ToString())
            End If
[+][-]03.20.2008 at 07:39AM PDT, ID: 21171972

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.20.2008 at 07:40AM PDT, ID: 21171989

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.20.2008 at 07:47AM PDT, ID: 21172059

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.20.2008 at 08:06AM PDT, ID: 21172248

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.20.2008 at 08:14AM PDT, ID: 21172335

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.20.2008 at 08:37AM PDT, ID: 21172612

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Programming for ASP.NET
Tags: ASP.NET - VB
Sign Up Now!
Solution Provided By: MaxOvrdrv2
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628