Click here to Skip to main content
15,896,440 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello ,

I have an pop up which open on button click event through which adding some data.The code for opening pop up is as follows

XML
<script type="text/javascript">
        function GetData() {
            
            var url = "abcd.aspx";
            var popupSetting = "center=yes,height=400,width=550,toolbar=no,directories=no,status=no,scrollbars=no,resizable=0,menubar=no,location=no,minimizable=no,maximizable=no,dialog=yes,modal=yes";
            var pmx = window.open(url, 'abcd', popupSetting);
        }
    </script>



And making the parent page to referesh while inserting or updating the record from pop up window.the code is as follows.

XML
<script type="text/javascript">
        function Close() {
            window.opener.location.reload();

            

        }
    </script>



But the problem is that whenever an pop up window is closed,the parent page again fires the last click event and again open the pop up window.Please tell me can i solve this..
Posted
Comments
Where are you calling the function GetData()?
ajays3356 30-May-14 2:31am    
I have button in parent page Add New.I am calling getdata on this click event as follows.

ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "MyFun1", "GetData();", true);
Naz_Firdouse 30-May-14 3:13am    
can you share your cs file???

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900