Communication between web pages

Discussion in 'ASP .Net' started by Leo Duran, Oct 23, 2003.

  1. Leo Duran

    Leo Duran Guest

    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 Duran, Oct 23, 2003
    #1
    1. Advertisements

  2. 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


    "Leo Duran" <> wrote in message
    news:...
    > 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!
    >
    >
    >
     
    Nicole Calinoiu, Oct 23, 2003
    #2
    1. Advertisements

  3. Leo Duran

    zPaul Guest

    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


    "Nicole Calinoiu" <> wrote in message
    news:...
    > 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
    >
    >
    > "Leo Duran" <> wrote in message
    > news:...
    > > 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!
    > >
    > >
    > >

    >
    >
     
    zPaul, Oct 23, 2003
    #3
  4. 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


    "zPaul" <~> wrote in message
    news:...
    > 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
    >
    >
    > "Nicole Calinoiu" <> wrote in message
    > news:...
    > > 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
    > >
    > >
    > > "Leo Duran" <> wrote in message
    > > news:...
    > > > 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!
    > > >
    > > >
    > > >

    > >
    > >

    >
    >
     
    Nicole Calinoiu, Oct 23, 2003
    #4
  5. Leo Duran

    Leo Duran Guest

    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" <> wrote in message
    news:...
    > 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
    >
    >
    > "Leo Duran" <> wrote in message
    > news:...
    > > 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 Duran, Oct 23, 2003
    #5
  6. Leo Duran

    SF Guest

    Put that line in there:

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


    "Leo Duran" <> wrote in message
    news:...
    > 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" <> wrote in message
    > news:...
    > > 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
    > >
    > >
    > > "Leo Duran" <> wrote in message
    > > news:...
    > > > 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!
    > > >
    > > >
    > > >

    > >
    > >

    >
    >
     
    SF, Oct 24, 2003
    #6
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jochen Neyens
    Replies:
    11
    Views:
    1,272
    Mark Rae
    Aug 7, 2004
  2. Nathan Sokalski
    Replies:
    5
    Views:
    1,140
    Gaurav Vaish \(www.Edujini-Labs.com\)
    Jan 10, 2007
  3. eggie5
    Replies:
    1
    Views:
    615
    Patrice
    Aug 1, 2007
  4. Nathan Sokalski
    Replies:
    4
    Views:
    393
    Nathan Sokalski
    Dec 21, 2006
  5. Nathan Sokalski
    Replies:
    4
    Views:
    425
    Nathan Sokalski
    Dec 21, 2006
Loading...

Share This Page