How to "reload" a child window?

Discussion in 'Javascript' started by DL, Jul 3, 2009.

  1. DL

    DL Guest

    Ran a quick search on child window "reload" without satisfactory
    result, hence, pose a question here.

    The word, "reload" is not really accurate, what I'd like to do is,
    upon certain event occurs at the child window, I'd like to call a
    script (be it php, .NET, or ColdFusion) either with form elements or
    URL with parameters. What is known, javascript variable for the child
    window. Also, the parent window stays put.


    How to?

    Thank you.
    DL, Jul 3, 2009
    #1
    1. Advertising

  2. DL

    Laser Lips Guest

    On Jul 3, 4:40 am, DL <> wrote:
    > Ran a quick search on child window "reload" without satisfactory
    > result, hence, pose a question here.
    >
    > The word, "reload" is not really accurate, what I'd like to do is,
    > upon certain event occurs at the child window, I'd like to call a
    > script (be it php, .NET, or ColdFusion)  either with form elements or
    > URL with parameters.  What is known, javascript variable for the child
    > window.  Also, the parent window stays put.
    >
    > How to?
    >
    > Thank you.


    DL, if the event occurs in the child window and you want to content of
    the PHP, .NET or ColdFusion to go into the child window then the child
    window should be able to take care of itself by catching the event and
    calling the PHP/.NET page itself. The parent need not intervene.

    Graham Vincent
    Laser Lips, Jul 3, 2009
    #2
    1. Advertising

  3. DL wrote:
    > Ran a quick search on child window "reload" without satisfactory
    > result, hence, pose a question here.
    >
    > The word, "reload" is not really accurate, what I'd like to do is,
    > upon certain event occurs at the child window, I'd like to call a
    > script (be it php, .NET, or ColdFusion) either with form elements or
    > URL with parameters. What is known, javascript variable for the child
    > window. Also, the parent window stays put.
    >
    > How to?


    Add event listeners to objects living in the "child window", either directly
    or through the "javascript variable". You might lose the relation to the
    "parent window" if you cause navigation there, though. Using frames in the
    popup could help with this, but might introduce more problems as well.

    I don't know what you mean be "call a script". Scripts are not called, they
    are executed (in most cases: source code is JIT-compiled, and the resulting
    byte code is interpreted). Scripts can generate content, if you mean that.


    PointedEars
    --
    realism: HTML 4.01 Strict
    evangelism: XHTML 1.0 Strict
    madness: XHTML 1.1 as application/xhtml+xml
    -- Bjoern Hoehrmann
    Thomas 'PointedEars' Lahn, Jul 3, 2009
    #3
  4. DL

    Don84 Guest

    On Jul 3, 10:38 am, Thomas 'PointedEars' Lahn <>
    wrote:
    > DL wrote:
    > > Ran a quick search on child window "reload" without satisfactory
    > > result, hence, pose a question here.

    >
    > > The word, "reload" is not really accurate, what I'd like to do is,
    > > upon certain event occurs at the child window, I'd like to call a
    > > script (be it php, .NET, or ColdFusion)  either with form elements or
    > > URL with parameters.  What is known, javascript variable for the child
    > > window.  Also, the parent window stays put.

    >
    > > How to?

    >
    > Add event listeners to objects living in the "child window", either directly
    > or through the "javascript variable".  You might lose the relation to the
    > "parent window" if you cause navigation there, though.  Using frames inthe
    > popup could help with this, but might introduce more problems as well.
    >
    > I don't know what you mean be "call a script".  Scripts are not called,they
    > are executed (in most cases: source code is JIT-compiled, and the resulting
    > byte code is interpreted).  Scripts can generate content, if you mean that.
    >
    > PointedEars
    > --
    >     realism:    HTML 4.01 Strict
    >     evangelism: XHTML 1.0 Strict
    >     madness:    XHTML 1.1 as application/xhtml+xml
    >                                                     -- Bjoern Hoehrmann


    You're right on the loose use of terminology by me, yes, to execute a
    script, not call a script in this case. I attempted to use something
    like onclick="self.location='scriptForSmallWindow.php';">stay in the
    same small window</a>
    to no avail, nor self.document.location ...

    or through the "javascript variable". Pls tell me more about it.
    Thanks.
    Don84, Jul 3, 2009
    #4
  5. Don84 wrote:
    > Thomas 'PointedEars' Lahn wrote:
    >> DL wrote:
    >>> Ran a quick search on child window "reload" without satisfactory
    >>> result, hence, pose a question here.
    >>> The word, "reload" is not really accurate, what I'd like to do is,
    >>> upon certain event occurs at the child window, I'd like to call a
    >>> script (be it php, .NET, or ColdFusion) either with form elements or
    >>> URL with parameters. What is known, javascript variable for the child
    >>> window. Also, the parent window stays put.
    >>> How to?

    >> Add event listeners to objects living in the "child window", either directly
    >> or through the "javascript variable". You might lose the relation to the
    >> "parent window" if you cause navigation there, though. Using frames in the
    >> popup could help with this, but might introduce more problems as well.
    >>
    >> I don't know what you mean be "call a script". Scripts are not called, they
    >> are executed (in most cases: source code is JIT-compiled, and the resulting
    >> byte code is interpreted). Scripts can generate content, if you mean that.
    >>
    >> [snip signatures]


    Learn to quote.

    > You're right on the loose use of terminology by me, yes, to execute a
    > script, not call a script in this case. I attempted to use something
    > like onclick="self.location='scriptForSmallWindow.php';">stay in the
    > same small window</a>
    > to no avail, nor self.document.location ...
    >
    > or through the "javascript variable". Pls tell me more about it.
    > Thanks.


    <http://www.catb.org/~esr/faqs/smart-questions.html>
    Thomas 'PointedEars' Lahn, Jul 4, 2009
    #5
  6. DL

    Don84 Guest

    On Jul 3, 7:58 pm, Thomas 'PointedEars' Lahn <>
    wrote:
    > Don84 wrote:
    > > Thomas 'PointedEars' Lahn wrote:
    > >> DL wrote:
    > >>> Ran a quick search on child window "reload" without satisfactory
    > >>> result, hence, pose a question here.
    > >>> The word, "reload" is not really accurate, what I'd like to do is,
    > >>> upon certain event occurs at the child window, I'd like to call a
    > >>> script (be it php, .NET, or ColdFusion)  either with form elements or
    > >>> URL with parameters.  What is known, javascript variable for the child
    > >>> window.  Also, the parent window stays put.
    > >>> How to?
    > >> Add event listeners to objects living in the "child window", either directly
    > >> or through the "javascript variable".  You might lose the relation to the
    > >> "parent window" if you cause navigation there, though.  Using framesin the
    > >> popup could help with this, but might introduce more problems as well.

    >
    > >> I don't know what you mean be "call a script".  Scripts are not called, they
    > >> are executed (in most cases: source code is JIT-compiled, and the resulting
    > >> byte code is interpreted).  Scripts can generate content, if you mean that.

    >
    > >> [snip signatures]

    >
    > Learn to quote.
    >
    > > You're right on the loose use of terminology by me, yes, to execute a
    > > script, not call a script in this case.  I attempted to use something
    > > like onclick="self.location='scriptForSmallWindow.php';">stay in the
    > > same small window</a>
    > > to no avail, nor self.document.location ...


    > > or through the "javascript variable".  Pls tell me more about it.
    > > Thanks.

    >
    > <http://www.catb.org/~esr/faqs/smart-questions.html>- Hide quoted text -
    >
    > - Show quoted text -


    You either understand the question, know an answer and is willing to
    chip in or **** off!
    Had enough of your crap!
    Don84, Jul 4, 2009
    #6
  7. DL

    SAM Guest

    Le 7/3/09 4:58 PM, Don84 a écrit :
    > On Jul 3, 10:38 am, Thomas 'PointedEars' Lahn <>
    > wrote:
    >> DL wrote:
    >>> Ran a quick search on child window "reload" without satisfactory
    >>> result, hence, pose a question here.
    >>> The word, "reload" is not really accurate, what I'd like to do is,
    >>> upon certain event occurs at the child window, I'd like to call a
    >>> script (be it php, .NET, or ColdFusion) either with form elements or
    >>> URL with parameters. What is known, javascript variable for the child
    >>> window. Also, the parent window stays put.
    >>> How to?

    >> Add event listeners to objects living in the "child window", either directly
    >> or through the "javascript variable". You might lose the relation to the
    >> "parent window" if you cause navigation there, though. Using frames in the
    >> popup could help with this, but might introduce more problems as well.


    > I attempted to use something
    > like onclick="self.location='scriptForSmallWindow.php';">stay in the
    > same small window</a>
    > to no avail, nor self.document.location ...


    You don't need 'self' if the link is in the child (popup),
    onclick="location='scriptForSmallWindow.php';">
    would have to do the job
    (open in same window (here the popup) the php file)

    > or through the "javascript variable". Pls tell me more about it.
    > Thanks.


    as said above, it is not certain that the child window will still
    remember its opener (the mother) so it will be probably better to use a
    function set in the mother page.

    onclick="opener.sendChild('scriptForSmallWindow.php');"

    mother's JS :
    =============
    function sendChild(url) {
    window.open(url,'theChild','width=300,height=300');
    }

    <https://developer.mozilla.org/en/DOM/window.open>


    The "javascript variable" (example) :

    JS :
    ====
    var choice;
    function setChoice(what) {
    choice = what.value;
    }

    HTML :
    ======
    <form>
    <input type=radio name="art" value="01" onclick="setChoice(this)"> art.01
    <input type=radio name="art" value="02" onclick="setChoice(this)"> art.02
    <input type=radio name="art" value="03" onclick="setChoice(this)"> art.03
    </form>
    <button onclick="opener.sendChild('query.php?art='+choice);">go</button>



    --
    sm
    SAM, Jul 5, 2009
    #7
  8. Don84 wrote:
    > On Jul 3, 7:58 pm, Thomas 'PointedEars' Lahn <>
    > wrote:
    >> Don84 wrote:
    >>> You're right on the loose use of terminology by me, yes, to execute a
    >>> script, not call a script in this case. I attempted to use something
    >>> like onclick="self.location='scriptForSmallWindow.php';">stay in the
    >>> same small window</a>
    >>> to no avail, nor self.document.location ...

    >
    >>> or through the "javascript variable". Pls tell me more about it.
    >>> Thanks.

    >> <http://www.catb.org/~esr/faqs/smart-questions.html>- Hide quoted text -
    >>
    >> - Show quoted text -

    >
    > You either understand the question, know an answer and is willing to
    > chip in or **** off!


    Is any of your postings supposed to make any sense at all?

    > Had enough of your crap!


    Likewise.


    PointedEars
    --
    Anyone who slaps a 'this page is best viewed with Browser X' label on
    a Web page appears to be yearning for the bad old days, before the Web,
    when you had very little chance of reading a document written on another
    computer, another word processor, or another network. -- Tim Berners-Lee
    Thomas 'PointedEars' Lahn, Jul 5, 2009
    #8
  9. DL

    Don84 Guest

    On Jul 4, 11:20 pm, SAM <>
    wrote:
    > Le 7/3/09 4:58 PM, Don84 a écrit :
    >
    >
    >
    >
    >
    > > On Jul 3, 10:38 am, Thomas 'PointedEars' Lahn <>
    > > wrote:
    > >> DL wrote:
    > >>> Ran a quick search on child window "reload" without satisfactory
    > >>> result, hence, pose a question here.
    > >>> The word, "reload" is not really accurate, what I'd like to do is,
    > >>> upon certain event occurs at the child window, I'd like to call a
    > >>> script (be it php, .NET, or ColdFusion)  either with form elements or
    > >>> URL with parameters.  What is known, javascript variable for the child
    > >>> window.  Also, the parent window stays put.
    > >>> How to?
    > >> Add event listeners to objects living in the "child window", either directly
    > >> or through the "javascript variable".  You might lose the relation to the
    > >> "parent window" if you cause navigation there, though.  Using framesin the
    > >> popup could help with this, but might introduce more problems as well.

    > > I attempted to use something
    > > like onclick="self.location='scriptForSmallWindow.php';">stay in the
    > > same small window</a>
    > > to no avail, nor self.document.location ...

    >
    > You don't need 'self' if the link is in the child (popup),
    >      onclick="location='scriptForSmallWindow.php';">
    > would have to do the job
    > (open in same window (here the popup) the php file)


    Sorry, I forgot to mention. I'm using Ext window class for windows
    management. Within this context, the above
    onclick="location='scriptForSmallWindow.php';"> at child window level
    goes back to the parent window.

    > > or through the "javascript variable".  Pls tell me more about it.
    > > Thanks.

    >
    > as said above, it is not certain that the child window will still
    > remember its opener (the mother) so it will be probably better to use a
    > function set in the mother page.
    >
    >     onclick="opener.sendChild('scriptForSmallWindow.php');"
    >
    > mother's JS :
    > =============
    > function sendChild(url) {
    > window.open(url,'theChild','width=300,height=300');
    >
    > }
    >
    > <https://developer.mozilla.org/en/DOM/window.open>
    >
    > The "javascript variable" (example) :
    >
    > JS :
    > ====
    > var choice;
    > function setChoice(what) {
    > choice = what.value;
    >
    > }
    >
    > HTML :
    > ======
    > <form>
    > <input type=radio name="art" value="01" onclick="setChoice(this)"> art.01
    > <input type=radio name="art" value="02" onclick="setChoice(this)"> art.02
    > <input type=radio name="art" value="03" onclick="setChoice(this)"> art.03
    > </form>
    > <button onclick="opener.sendChild('query.php?art='+choice);">go</button>


    Within the ext window context, I preloaded the two windows, default
    diplays the Main window,
    on click event for the small window, it then displays and floating
    over the main one...

    Thanks.

    > --
    > sm- Hide quoted text -
    >
    > - Show quoted text -
    Don84, Jul 5, 2009
    #9
  10. DL

    Don84 Guest

    On Jul 5, 9:24 am, Thomas 'PointedEars' Lahn <>
    wrote:
    > Don84 wrote:
    > > On Jul 3, 7:58 pm, Thomas 'PointedEars' Lahn <>
    > > wrote:
    > >> Don84 wrote:
    > >>> You're right on the loose use of terminology by me, yes, to execute a
    > >>> script, not call a script in this case.  I attempted to use something
    > >>> like onclick="self.location='scriptForSmallWindow.php';">stay in the
    > >>> same small window</a>
    > >>> to no avail, nor self.document.location ...

    >
    > >>> or through the "javascript variable".  Pls tell me more about it.
    > >>> Thanks.
    > >> <http://www.catb.org/~esr/faqs/smart-questions.html>- Hide quoted text-

    >
    > >> - Show quoted text -

    >
    > > You either understand the question, know an answer and is willing to
    > > chip in or **** off!

    >
    > Is any of your postings supposed to make any sense at all?
    >
    > > Had enough of your crap!

    >
    > Likewise.
    >
    > PointedEars
    > --
    > Anyone who slaps a 'this page is best viewed with Browser X' label on
    > a Web page appears to be yearning for the bad old days, before the Web,
    > when you had very little chance of reading a document written on another
    > computer, another word processor, or another network. -- Tim Berners-Lee-Hide quoted text -
    >
    > - Show quoted text -


    I've said, **** off, asshole! You are NOT the only one who knows
    javascripting real well, try to be born again by a human mother again,
    asshole!
    Don84, Jul 5, 2009
    #10
  11. Don84 wrote:
    > Thomas 'PointedEars' Lahn wrote:
    >> Don84 wrote:
    >>> Thomas 'PointedEars' Lahn wrote:
    >>>> Don84 wrote:
    >>>>> [gibberish]
    >>>> <http://www.catb.org/~esr/faqs/smart-questions.html>
    >>> You either understand the question, know an answer and is willing to
    >>> chip in or **** off!

    >> Is any of your postings supposed to make any sense at all?
    >>
    >>> Had enough of your crap!

    >> Likewise.
    >> [...]

    >
    > I've said, **** off, asshole! You are NOT the only one who knows
    > javascripting real well, try to be born again by a human mother again,
    > asshole!


    Well, you certainly can't seem to get enough of my "crap", and to show off
    your "intelligence". So maybe, just maybe, the problem is with *you* instead?


    PointedEars
    --
    realism: HTML 4.01 Strict
    evangelism: XHTML 1.0 Strict
    madness: XHTML 1.1 as application/xhtml+xml
    -- Bjoern Hoehrmann
    Thomas 'PointedEars' Lahn, Jul 5, 2009
    #11
  12. DL

    David Mark Guest

    On Jul 5, 12:14 pm, Don84 <> wrote:
    > On Jul 4, 11:20 pm, SAM <>
    > wrote:
    >
    >
    >
    > > Le 7/3/09 4:58 PM, Don84 a écrit :

    >
    > > > On Jul 3, 10:38 am, Thomas 'PointedEars' Lahn <>
    > > > wrote:
    > > >> DL wrote:
    > > >>> Ran a quick search on child window "reload" without satisfactory
    > > >>> result, hence, pose a question here.
    > > >>> The word, "reload" is not really accurate, what I'd like to do is,
    > > >>> upon certain event occurs at the child window, I'd like to call a
    > > >>> script (be it php, .NET, or ColdFusion)  either with form elements or
    > > >>> URL with parameters.  What is known, javascript variable for the child
    > > >>> window.  Also, the parent window stays put.
    > > >>> How to?
    > > >> Add event listeners to objects living in the "child window", either directly
    > > >> or through the "javascript variable".  You might lose the relationto the
    > > >> "parent window" if you cause navigation there, though.  Using frames in the
    > > >> popup could help with this, but might introduce more problems as well.
    > > > I attempted to use something
    > > > like onclick="self.location='scriptForSmallWindow.php';">stay in the
    > > > same small window</a>
    > > > to no avail, nor self.document.location ...

    >
    > > You don't need 'self' if the link is in the child (popup),
    > >      onclick="location='scriptForSmallWindow.php';">
    > > would have to do the job
    > > (open in same window (here the popup) the php file)

    >
    > Sorry, I forgot to mention.  I'm using Ext window class for windows
    > management.


    Figures. See if you can get a refund.
    David Mark, Jul 6, 2009
    #12
    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. bhchng
    Replies:
    0
    Views:
    643
    bhchng
    Jan 13, 2004
  2. Joshua Beall
    Replies:
    26
    Views:
    219,986
    AndreiKaa
    Jun 29, 2007
  3. Jeff Rodriguez
    Replies:
    23
    Views:
    1,093
    David Schwartz
    Dec 9, 2003
  4. js
    Replies:
    0
    Views:
    166
  5. Spammay Blockay
    Replies:
    1
    Views:
    402
    Dietmar Meier
    Feb 4, 2005
Loading...

Share This Page