Scott,
My monkey skills are a bit rusty this morning, how about we talk javascript?
Are you saying I can write a js function in frame B like;
function fnFunction()
{
alert('no monkey talk this morning!');
}
and register it with the parent like so;
top.fnParentFunction = fnFunction;
Then call it from frame A like top.fnParentFunction( var1, var2 );
??
That's what my monkey translator told me anyway... Correct me if I am wrong.
But that would not work as the function would reference to elements as
document.forms[0].elements and not document.frames[0].elements
Cheers.
Real programmer for hire! ;-))
On 12 Aug 2004 at 14:08, Scott Barnes wrote:
> Taco, typically if possible, you could register the function within the
> top scope:
>
> ie
> frame a function = doMonkey()
> frame b function = beAMonkey();
>
> Inside the overall JS where those functions exist you could do this:
>
> framea.js
> top.doMonkey = doMonkey;
>
> frameb.js
> top.beAMonkey = beAMonkey;
>
> The reason i mention this, is it can get a bit tedious making iframes
> talk to one another, and with browsers like Opera, you could run into a
> wall if your not careful. To me the top scopes kind of like our
> application scope in CFMX, use it wisely but when used it can be beneficial.
>
> Regards
> Scott Barnes
> http://www.spidaweb.com
>
> CodeMonkey For Hire.
>
>
>
> Andrew Scott wrote:
> > Taco,
> >
> > From memory you need to call the function by the window name, same as if it
> > was a frame!
> >
> >
> > Regards
> > Andrew Scott
> > Technical Consultant
> >
> > NuSphere Pty Ltd
> > Level 2/33 Bank Street
> > South Melbourne, Victoria, 3205
> >
> > Phone: 03 9686 0485 - Fax: 03 9699 7976
> >
> >
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On Behalf Of
> > [EMAIL PROTECTED]
> > Sent: Thursday, 12 August 2004 12:28 PM
> > To: CFAussie Mailing List
> > Subject: [cfaussie] [OT] Call a function in an iframe
> >
> > I have a page with two iframes on it (yuk), in frame A when a certain button
> > is clicked I need to call a function in iframe B.
> >
> > I was thinking that something like
> > parent.document.all['frameB'].fnSelectFamily( false, 25 ); in iframe A would
> > do the trick, but it gives me an error.. something about object doesn't
> > support this property..
> >
> > Anyone any ideas?
> >
> > --
> > Taco Fleur
> > Senior Web Systems Engineer
> > http://www.webassociates.com
> >
> >
> > ---
> > You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
> > To unsubscribe send a blank email to
> > [EMAIL PROTECTED]
> > Aussie Macromedia Developers: http://lists.daemon.com.au/
> >
> >
> >
> >
> >
>
> ---
> You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
> To unsubscribe send a blank email to [EMAIL PROTECTED]
> Aussie Macromedia Developers: http://lists.daemon.com.au/
--
Taco Fleur
Senior Web Systems Engineer
http://www.webassociates.com
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/