Communication between web pages

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!
 
N

Nicole Calinoiu

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
 
Z

zPaul

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
 
N

Nicole Calinoiu

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
 
L

Leo Duran

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
 
S

SF

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top