How do I give control back to a previous window

  • Thread starter Thread starter Ralf
  • Start date Start date
R

Ralf

I have a window where I am adding rows to a table. One of the features
is to change a group name for given rows. They want another window to
open up to create new groups, edit them, etc. I have done this, but
when they close the window they want the value they changed to show up
in the row. There is only one row for it to go in, but I don't know
how to transfer back to the window and have the value in place to add
to the row. I am using .NET 1.1 with VS 2003
 
from your popup window try folowing javascript when closing it.
parent.location.reload()


George.
 
Can you be more example oriented? The parent.location.reload? I can't
find anything on it. Is it javascript?
 
OK, this brings up another issue. When I'm working on the parent page
and I've made some changes to a filter from the default to something
else to display a particular row, and I then bring up the popup window
to change a group name. I want to go back to the parent window and
keep all the filters as they were, not back to the default. I have to
use the new group name from the popup to edit the row I was working
with in the first place. What is the best way to do this?
 
In those cases I do "dummy" postback.

Using "parent" object you can call any JavaScript function on that page.
1. I would drop empty LinkButton on my page (Empty means no Text). So user
do not see it hence can not click on it. You can also add
style="dispaly:none" to make sure.

2. disable validation when that button clicked (one of the properties of the
button).

3. run that page and see in HTML source what javascript code .NET will plug
on OnClick event for that link.
It's got to be something like __doPostBack('controlname', '');

4. Instead of "parent.location.reload()" have on your Popup window
"parent.__doPostBack('controlname', ''); "

hope that helps.
George.






George.
 
Thx for the help, but I'm just not getting it. I'm fairly new to asp
programing, so bear with me please.
I have done steps one and two on my parent page. I am using vb code
behind, not straight ASP.
I am confused about how to accomplish step 3. On my design page in VS,
I selected to see the HTML source, but it only showed me the
LinkButton, no event. I went to the code behind, and added the click
event to the button, but it still didn't show it to me. I then ran the
app, went to the parent page, and did a view->code from the IE browser.
Didn't even show the LinkButton at all. Can you point me at what to
do here?
Also, will I have to do the coding in the HTML or can I do it in the
code behind module. THe coding I am talking about is when I'm on the
popup, I would like to call a function/sub on the parent page that is
written in the code behind module. Is this possible?
 
Back
Top