Click here to Skip to main content
15,894,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi frnds,
in the parent page i have a button and if i click, it opens a child pop-up window by the code behind javascript. In the child pop-up window i have binded a gridview in which has a link button in one of the columns and if i click the linkbutton i get a row value which pass to the parent page and shows some values in gridview. everything is fine so far.

The only problem is after i click link button in pop-up window it has to close and value should pass to parent page and parent page should get refresh. i dont have any buttons like submit or cancel for writing javascript for pop-up window close or parent page refresh and both the parent page and pop-up window has gridview. so if i write javascript in the pop-up window the parent page gets opening which is wrong. so, all i want is to close pop-up window when i click the link button in pop-up window and parent page should get refresh.
can anyone help me out guys, plzease?

asp.net(vb)
Posted
Updated 1-Nov-11 6:48am
v3

1 solution

If you have opened the popup with JavaScript you can communicate with the parent by using Window.opener[^]

JavaScript
function linkClicked()
{
  // Refresh the parent
  window.opener.location.href = window.opener.location.href;
  // Close the popup
  window.close();
}
 
Share this answer
 

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