Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: parent frames

  1. #1
    New Coder
    Join Date
    Jun 2002
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    parent frames

    passing info from one frame to another

    can you take alook and advise on what I am missing...

    http://voyager.deanza.fhda.edu/~kkr4...sNforms_2.html

    code from parent frame

    function ExchangeTop(form)
    {
    comFraB.form.getTextTop.value = comFraA.document.forms.sendTextTop.value;
    } /* end ExchangeTop() */

    function ExchangeBottom (form)
    {
    comFraA.form.getTextBot.value = comFraB.document.forms.sendTextBot.value;
    } /* end exchangeBottom() */

    Calls from child frames fraA and fraB
    fraA =
    onblur="parent.ExchangeTop(this.form);"

    fraB=
    onblur="parent.ExchangeBottom(this.form);"

    insight always appreciated
    thank you
    Kevin
    Last edited by Kevin; 03-02-2003 at 11:51 PM.

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,030
    Thanks
    0
    Thanked 247 Times in 244 Posts
    since you passed the form handle to the function, you can use it directly like:

    function ExchangeTop(f)
    {
    top.frames['comFraB'].document.formNameOfFrameB.getTextTop.value = f.sendTextTop.value;
    } /* end ExchangeTop() */

    function ExchangeBottom (f)
    {
    top.frames['comFraA'].document.formNameOfFrameA.getTextBot.value = f.sendTextBot.value;
    } /* end exchangeBottom

    i suggest you change the parameter name form to something else, it might conflict with the form property of html controls.

  • #3
    New Coder
    Join Date
    Jun 2002
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    forms and frames

    I appreciate the help

    I forgot that I needed to name the forms for each frame and then pass that....

    Thank You
    Kevin


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •