Thanks for the input but swicthing away is not an option.

I have tested my theory and some of the functions work with parent but some 
do not. For example

alert(parent.$('foo').value); // works


// do somehting
} ); // does not work

I came up with a work around.. i just loaded a light version of jquery 1.2 
into the iframe and used that - it came in around 20k so its not that bigger 
deal tbh.

Thanks for your input.


Alex Mcauley

----- Original Message ----- 
From: "Jim Higson" <j...@wikizzle.org>
To: <prototype-scriptaculous@googlegroups.com>
Sent: Monday, October 05, 2009 4:05 PM
Subject: [Proto-Scripty] Re: Iframes

> On Monday 05 October 2009 13:13:13 Alex Mcauley wrote:
>> Afternoon peoples, hope everyone had a good weekend.
>> Got a sligt problem... I have been developing a new app that needs an
>> iframe to upload an image...
>> All of this is done and working properly but i need to use some
>> prototypejs functions fro the parent document...
>> I can simple call with "parent.myFunction();" for it to work...
>> Will prototype functions work this way aswell...
>> Something like...
>> parent.$('myIframeElement').observe(...........
>> Or will it completely not work like that ... I dont want to re-
>> download prototype to the browser from inside the iframe as it will
>> slow it down and is not neccessary
> My advice is to switch away from iframes. You can use them with prototype
> but I've always found it creates lots of problems. Prototype assumes a 
> single,
> global document and window. When there are two it often goes wrong, even 
> if
> you load it twice.
> For example, you can replace iframes+designMode with div+contentEditable,
> possibly making the div scroll with overflow:scroll.
> HTH,
> Jim
> -- 
> Jim
> my wiki ajaxification thing: http://wikizzle.org
> my blog: http://jimhigson.blogspot.com/
> >

You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to