Subject: refresh the parent window when closing the popup
Posted By: ram_siddinen Post Date: 1/30/2004 12:50:03 PM
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("ConnectionString")
        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.
Reply By: planoie Reply Date: 1/30/2004 3:05:58 PM
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.

Go to topic 9217

Return to index page 959
Return to index page 958
Return to index page 957
Return to index page 956
Return to index page 955
Return to index page 954
Return to index page 953
Return to index page 952
Return to index page 951
Return to index page 950