I have a site based on SocialEngine 4 which uses moo-tools-1.2.5.
There’s an iframe with some js that opens in pop-up (with built-in Smoothbox plug-in).
And I can’t get a DOM element of this iframe from JS included into it just by calling $$(), I’ve needed to use a kludge like this:
var context = (window.frames[0]) ? window.frames[0] : window;
context.$('user_email').set('value', context.$('1_1_30').get('value'));
That’s strange and I guess that it is unexpected behavior because JS in standard SocialEngine modules don’t work within iframes too.
this is because in 1.2.5,
$$is an alias forthis.document.getElements.I suggest you use the IFrame wrapper class from mootools-core which can extend iframes so they get mootoolsy, you can then do stuff like: