Updte contents of a Child (popup) window...

SteveoAtilla

Regular
Joined
Dec 22, 2004
Messages
80
Location
The Frozen Tundra
Hello!

I've done several searches and have not found what I need. Hopfully, one of you can help me out!

I have a website with VB.NET codebehind pages. I am opening up a child window with a window.open JScript command like this:

Visual Basic:
Dim sScript As String
sScript = "<script>window.open('CurrProp.aspx','','resizable=yes,top=10,left=10,height=310,width=730,directories=no,scrollbars=no,toolbars=no,menubar=no,location=no');<" & "/script>"
Response.Write(sScript)

That window will have a datagrid showing the current contents of a proposal. The Parent window will be where the user adds items to the proposal.

When they click an "Add" button, how do I trigger the datagrid on the Child window to re-bind to the new contents of the proposal?

Thanks,

Kahuna
 
Name the child window

Code:
window.open('new.aspx','childwindow','parameters');


When you click Add button, upon postback, render javascript to accesses the childwindow via its name and call a javascript function on that child window. This js function can submit the form and set the control which caused the postback on the child form or, the function could be simply to refresh that page with the new info.
 
kahlua001 said:
Name the child window
When you click Add button, upon postback, render javascript to accesses the childwindow via its name and call a javascript function on that child window. This js function can submit the form and set the control which caused the postback on the child form or, the function could be simply to refresh that page with the new info.

Kahlua,

Thanks for the reply. A question, however. I am totally new to JS, so I have no idea what I would use as a JS function or how to call it from the parent form. The DataAdapter and SQL commands I have, and I have bound the DataGrid on the child form to the proper data sources, but I don't know how to trigger the refresh on the child form.

The theory sounds perfect, but as always, the devil is in the details.

Kahuna
 
Back
Top