It extends Element object (or class) not the page. Since "test2.htm" is a different page you should include mootools to it too. You may consider using Request.HTML instead of using iframes.
Regards, Can HANHAN w: http://www.finarfin.net On Sat, Feb 14, 2009 at 9:44 PM, websam <[email protected]> wrote: > > Well as i understand it from the mootools docs, I don't have to as it > should extend mootools to the iframes document, but mayby i'm > wrong ?!? > > On 14 Feb., 19:50, Can HANHAN <[email protected]> wrote: > > Is this code in test2.htm? If so do you have mootools.js included to > > test2.htm? > > > > Regards, > > > > Can HANHAN > > w:http://www.finarfin.net > > > > > > > > On Sat, Feb 14, 2009 at 8:38 PM, websam <[email protected]> wrote: > > > > > Hi there, > > > > > I'm trying to create an iframe like this : > > > > > myIFrame = new IFrame({ > > > id: 'iframe_content', > > > src: 'test2.htm' > > > }); > > > > > myIFrame.inject(document.body); > > > > > And that is working just fine, and in the page i load i try to run a > > > simple script : > > > > > window.addEvent('domready', function() { > > > $('test').set('text', 'Tester Mootools i IFrame'); > > > }); > > > > > But this fails with the error : window.addEvent is not a function, > > > then i made a search on this matter and found that it only would work > > > if the app is on a live server. I then tryed on my server, but still > > > the same error. > > > > > I even tryed to apply this fix : > > > > >http://mootools.lighthouseapp.com/projects/2706/tickets/53-native-ele. > .. > > > but still no luck on extending mootools to the iframe. > > > > > Can someone tell me what to do or how to fix this ? > > > > > /Martin- Skjul tekst i anførselstegn - > > > > - Vis tekst i anførselstegn -
