View Full Version : parent frames

03-02-2003, 10:56 PM
passing info from one frame to another

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


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 =


insight always appreciated
thank you
Kevin :thumbsup:

03-03-2003, 12:35 AM
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.

03-03-2003, 02:01 AM
I appreciate the help

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

Thank You
Kevin :thumbsup:

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum