Communication between web pages

  • Thread starter Thread starter Leo Duran
  • Start date Start date
L

Leo Duran

I am working on a web app and would like to enable it to use multiple
browser windows...

For example, a list of customers would have an Edit button.

Edit | First Name | Last Name | Address
.... | Leo | Duran | 23 street

When you click the edit button a window pops up with an Edit form. After the
user edits the entry, they close the window and the underlying one
automatically updates.

Can I make a page that is a pop up window tell the page that called to
refresh and get new information from the DB?

Thanks for the help!
 
Leo,

Yes. Create a "Close" link or button in the editing page. From it, run the
following client-side javascript:

window.opener.location.reload();
window.close();

HTH,
Nicole
 
You can only do that from javascript. but, reload is not good way of doing
it although it may work for you. If the list page got some form variables
passed from another page, you will get a prompt saying that "trying
resubmit..." I can't remember exact message. In this case, you want to
create a javascript function in the list page to submit and call that
function from popup
 
Paul,

Sure, but it's not all that common. Most list pages of this type either
have no parameters or receive their parameters from the query string, not a
form post. Maintenance of the type of solution you propose can be a
problem, so I'd hesitate to recommend it unless it's actually necessary.

Nicole
 
So far so good, I'm using a HyperLink control to call the EditCustomer web
page and it opens in a new window just like planned...
HyperLink lnk = new HyperLink();
lnk.Text = "Edit";
lnk.NavigateUrl = "EditCustomer.aspx?CustomerID=" +
e.Item.Cells[1].Text;
lnk.Target = "_blank";

I've never used client side script, can you be give me an example of how the
EditCustomer page should be programmed to make use of client side script?
OR, point me to a good reference for using client side script.

Thanks again for the help!

Leo
 
Put that line in there:

<a href="javascript:window.opener.location.reload();window.close();">Close
popup</a>


Leo Duran said:
So far so good, I'm using a HyperLink control to call the EditCustomer web
page and it opens in a new window just like planned...
HyperLink lnk = new HyperLink();
lnk.Text = "Edit";
lnk.NavigateUrl = "EditCustomer.aspx?CustomerID=" +
e.Item.Cells[1].Text;
lnk.Target = "_blank";

I've never used client side script, can you be give me an example of how the
EditCustomer page should be programmed to make use of client side script?
OR, point me to a good reference for using client side script.

Thanks again for the help!

Leo

Nicole Calinoiu said:
Leo,

Yes. Create a "Close" link or button in the editing page. From it, run the
following client-side javascript:

window.opener.location.reload();
window.close();

HTH,
Nicole


After
the
 
Back
Top