Window control

Discussion in 'HTML' started by coder, Oct 16, 2007.

  1. coder

    coder Guest

    Say you have a window that spawns a second window (through window.open() ).
    Is it possible to have a button click in the child window produce a change
    in the parent window?
    coder, Oct 16, 2007
    #1
    1. Advertising

  2. coder

    mbstevens Guest

    coder wrote:
    > Say you have a window that spawns a second window (through window.open() ).


    Yes, but it is seldom a good idea.

    > Is it possible to have a button click in the child window produce a change
    > in the parent window?


    Investigate the openRemote() function. Remote control windows are
    (unfortunately) quite common on the net.
    mbstevens, Oct 16, 2007
    #2
    1. Advertising

  3. coder

    Shelly Guest

    "mbstevens" <> wrote in message
    news:...
    > coder wrote:
    >> Say you have a window that spawns a second window (through
    >> window.open() ).

    >
    > Yes, but it is seldom a good idea.


    Here is my situation. I have an app running. There is also a pop-up window
    with a list of places to call to followup sales leads. Each company on that
    list is now a hyperlink that opens up the company information in that same
    child window. To go to the next one, the user would have to use the back
    button on the browser. I would like to have the company information appear
    in the parent window when the company name is clicked in the child window
    (it doesn't have to be a hyperlink). This would make for the cleanest app.
    So, why is it "seldom a good idea"?

    >
    >> Is it possible to have a button click in the child window produce a
    >> change in the parent window?

    >
    > Investigate the openRemote() function. Remote control windows are
    > (unfortunately) quite common on the net.


    Why "unfortunately"? I'll look into openRemote().
    Shelly, Oct 16, 2007
    #3
  4. coder

    mbstevens Guest

    mbstevens wrote:

    > Investigate the openRemote() function. Remote control windows are
    > (unfortunately) quite common on the net.
    >

    This is not a built-in function.
    Details...
    .....
    var remote = null;
    window.name = "content";
    function
    openRemote(contentURL, windowName,x,y){
    wh='height=' + y + 'width=' + x;
    remote=window.open(zotURL,windowName,wh);
    remote.focus();
    }
    .....
    <<This was adapted from Teague's DHTML book.>>

    The control window can use calls like:
    ....
    <a href= "x.html" target="content"> xstuff </a>
    ....

    openRemote is called with stuff like:
    ....
    <a href="javascript::eek:penRemote('remote.html','remote', 200,500)">Open Controls</a>
    ....
    mbstevens, Oct 16, 2007
    #4
  5. coder

    mbstevens Guest

    Shelly wrote:
    > "mbstevens" <> wrote in message
    > news:...
    >> coder wrote:
    >>> Say you have a window that spawns a second window (through
    >>> window.open() ).

    >> Yes, but it is seldom a good idea.

    >
    > Here is my situation. I have an app running. There is also a pop-up window
    > with a list of places to call to followup sales leads. Each company on that
    > list is now a hyperlink that opens up the company information in that same
    > child window. To go to the next one, the user would have to use the back
    > button on the browser.


    No, you just use either a preprocessor or server side programming
    to reproduce the navigation list on each page.

    > I would like to have the company information appear
    > in the parent window when the company name is clicked in the child window
    > (it doesn't have to be a hyperlink). This would make for the cleanest app.
    > So, why is it "seldom a good idea"?



    They can confuse search engines, and they are a pain for the visitor.
    The little window has to come up with focus, so your visitor usually has to
    reposition it. There is the matter of when to close it. If your
    visitor has a pop up blocker, s/he will have to click to get the pop up.

    It will be easier to just have everything your visitor needs right
    in the window with the content.
    mbstevens, Oct 16, 2007
    #5
  6. coder

    Shelly Guest

    "mbstevens" <> wrote in message
    news:...
    > coder wrote:
    >> Say you have a window that spawns a second window (through
    >> window.open() ).

    >
    > Yes, but it is seldom a good idea.
    >
    >> Is it possible to have a button click in the child window produce a
    >> change in the parent window?

    >
    > Investigate the openRemote() function. Remote control windows are
    > (unfortunately) quite common on the net.
    >


    When I changed the link to:
    <a href="javascript:go('client.php?type=edit&id=16')" TestClient Five</a>

    with
    function go(url) {
    opener.location = url;
    }

    in the script section, it worked like a cherm. Thank you very much.
    Shelly, Oct 16, 2007
    #6
    1. Advertising

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. Matt
    Replies:
    2
    Views:
    13,939
    bruce barker
    Aug 23, 2004
  2. Andrew Bewley via DotNetMonster.com

    window to window communication (window.opener)

    Andrew Bewley via DotNetMonster.com, Feb 3, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    1,046
    Andrew Bewley via DotNetMonster.com
    Feb 3, 2005
  3. Matt
    Replies:
    1
    Views:
    425
    Andrew Thompson
    Aug 22, 2004
  4. Matt
    Replies:
    5
    Views:
    3,040
    Michael Winter
    Aug 25, 2004
  5. Matt
    Replies:
    3
    Views:
    221
    Bob Barrows [MVP]
    Aug 22, 2004
Loading...

Share This Page