satya kishore

satya kishore

  • NA
  • 7
  • 9.9k

Java Script not working when updating webpage but working at insertion time -.net

Feb 6 2009 6:28 AM

i am opening a pop-up window in the button click event and closing it after submiting popup and refreshing the parent window  which consist a grid

my requirement is.. after submiting the popup the result will be displayed in grid which is in parent window 

i wrote this code....in the button click event in parent window

function popwindow()

{

window.open('popup1.aspx',0,'width=700px,height=400px,toolbar=no');

}

and below code in popup window fro insertion

<script language="javascript" type="text/javascript">

function popwindowclose()

{

window.self.close();

if (window.opener && !window.opener.closed) {

window.opener.location.reload();

}

}

</script>

then i want to edit the contents in grid by using link button in templete field of grid and handling in row command event.

popup window is opening for update but when Submitting the window i want close child window and update grid in parent window

MYPROBLEM IS:

update is success but the popup(child)  is opeing again and again inseted of closing the child window after submiting .

my code:

function EDIT1(ht)

{

window.open('pop2.aspx?cid='+ht,'cnu','width=700px,height=400px,toolbar=no');

}

</script>

Thanks and Regards

SATYA&SINU