Kumod Singh
Kumod Singh

Reputation: 2163

Javascript post back of parent page from child page

On Button Click I am calling this JavaScript Method from Child(aspx) page.

 function closechildwindow() {
            window.opener.document.forms(0).submit(); 
            self.close();
        }

Its closes the child Page and its also makes a post back on the parent page. But the parent page is open in a separate Tab.

I don't want this. I want that post back to happen on parent page in same tab that is already open, and should not open in new tab.

Please help me

Upvotes: 2

Views: 2919

Answers (1)

Geeky Guy
Geeky Guy

Reputation: 9399

What you need is calling the __doPostBack() Javascript function on the parent window:

window.opener.__doPostBack();

Upvotes: 1

Related Questions