Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > .NET 1.0 and Visual Studio.NET > VS.NET 2002/2003
|
VS.NET 2002/2003 Discussions about the Visual Studio.NET programming environment, the 2002 (1.0) and 2003 (1.1). ** Please don't post code questions here ** For issues specific to a particular language in .NET, please see the other forum categories.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VS.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 30th, 2004, 01:50 PM
Registered User
 
Join Date: Jan 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default refresh the parent window when closing the popup

hi,

  i have some problem with the popup and parent window combination.the senario is like this

when i click on the datagrid columns popup with relative information is displaying thats going well.when i update the information in the popup window and clicks on the update button the popup should be closed and the parent one is to be refreshed.i am getting this to right but the problem is whenever i am trying to relod the parent one
dialog box is comming in the browser stating that r u want to reload or not.how can i remove this message .

any body please give up

on the update button i used this code.

constring = ConfigurationSettings.AppSettings("ConnectionStrin g")
        conpb = New SqlConnection(constring)
        cmdSelect = New SqlCommand("Pb_Sp_UpdateNotes", conpb)
        cmdSelect.CommandType = CommandType.StoredProcedure
        cmdSelect.Parameters.Add("@Follow_Up_Date", Request.Form("Txtfollowupdate"))
        cmdSelect.Parameters.Add("@Follow_up_complete", "0")
        cmdSelect.Parameters.Add("@Visit_Comments", Request.Form("txtcomments"))
        cmdSelect.Parameters.Add("@Visit_Id", Request.Form("lblvisitid"))

        conpb.Open()
        cmdSelect.ExecuteNonQuery()
        conpb.Close()
        Dim script As String = ""
        script &= "<script language=javascript>"
        script &= "opener.location.reload(true);"
        script &= "opener.clientinfo.submit();"
        script &= " window.close();"
        script &= "</script>"

        Response.Write(script)



regards&thanks,
RamuSiddineni.
 
Old January 30th, 2004, 04:05 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Try just the submit() on the parent window. If you reload it, you'll get that browser prompt, but if you submit() it (just doing a postback without any events) then it will refresh. However, depending on how your datagrid is set up you might not get any updates because the datagrid may be populated based on IsPostback.

Peter
------------------------------------------------------
Work smarter, not harder.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Close Child window automatically on closing parent vikas67k C# 1 August 26th, 2008 02:00 AM
Closing parent window from child window arnabghosh Javascript How-To 1 December 26th, 2007 01:18 AM
Problem in closing the parent window from a popup rakesh.kashnia1 Javascript 4 July 9th, 2007 05:39 AM
Centering Popup window & Blur Parent window jkusmanto Javascript How-To 0 May 25th, 2007 03:19 AM
get popup window value without refresh qadeerahmad General .NET 6 August 4th, 2006 10:49 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.