Passing value from parent to child window created by Pop up

Discussion in 'Javascript' started by sangram, Dec 5, 2006.

  1. sangram

    sangram Guest

    Passing value from parent to child window created by Pop up
     
    sangram, Dec 5, 2006
    #1
    1. Advertising

  2. sangram

    ASM Guest

    sangram a écrit :
    > Passing value from parent to child window created by Pop up



    truc = window.open('file.htm');

    In mother window :
    daughter = truc.document;
    daughter.forms[0].aText.value = document.forms[0].myText.value;

    In daughter window :
    mother = opener.document;
    mother.forms[0].myText.value = document.forms[0].aText.value;

    --
    Stephane Moriaux et son (moins) vieux Mac déjà dépassé
    Stephane Moriaux and his (less) old Mac already out of date
     
    ASM, Dec 5, 2006
    #2
    1. Advertising

  3. sangram

    Ruso Guest

    ASM wrote:
    > sangram a écrit :
    > > Passing value from parent to child window created by Pop up

    >
    >
    > truc = window.open('file.htm');
    >
    > In mother window :
    > daughter = truc.document;
    > daughter.forms[0].aText.value = document.forms[0].myText.value;
    >
    > In daughter window :
    > mother = opener.document;
    > mother.forms[0].myText.value = document.forms[0].aText.value;
    >
    > --
    > Stephane Moriaux et son (moins) vieux Mac déjà dépassé
    > Stephane Moriaux and his (less) old Mac already out of date


    Here you can find a good example of how cross window script works.
    Pritty simple and easy to understand code:
    http://www.galasoft-lb.ch/myjavascript/consulting/2000090401.html
     
    Ruso, Dec 5, 2006
    #3
    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. Natty Gur
    Replies:
    0
    Views:
    629
    Natty Gur
    Jul 1, 2003
  2. Noel Dolan
    Replies:
    0
    Views:
    274
    Noel Dolan
    Jul 18, 2004
  3. Spammay Blockay
    Replies:
    1
    Views:
    530
    Dietmar Meier
    Feb 4, 2005
  4. Replies:
    0
    Views:
    344
  5. Bitswapper
    Replies:
    5
    Views:
    182
    Prasad, Ramit
    Aug 27, 2013
Loading...

Share This Page