Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 call window opener function

Author  Topic 

juicyapple
Posting Yak Master

176 Posts

Posted - 2008-03-23 : 23:06:55
Hi, how to call window opener function? I tried in this way but I get error : window.opener is null... Please help.

Private Sub btnOK_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnOK.Click
AddUserToGroup(cboGroupName.SelectedValue, lstMember.SelectedValue, cboGroupName.SelectedItem.Text)
ClientScript.RegisterClientScriptBlock(Me.GetType, "CloseWindowScript", "window.opener.ListAllMembers();window.close();", True)
End Sub

ayamas
Aged Yak Warrior

552 Posts

Posted - 2008-03-29 : 06:12:38
You need to first set an refrence to the window object.
Something like this
var win=window.open('Page.aspx');
win.opener.ListAllMembers();
Go to Top of Page
   

- Advertisement -