Hello, everyone!
I have some problems with Adobe Air. My application has rather complicated architecture: the main html window loads iframe with references to javascripts (e.g. DWRengine.js, jquery.js, main.js and so on). It's done to avoid Air's javascript restrictions on 'eval' function, which is widely used in my scripts and in DWR too.
In main.js file I'm trying to add event listeners to main window's buttons and links.
Like this:
$(document).ready(function(){
$('body', top.document).click(function(){alert('a');});
});
But there's no effect! top.document
is undefined.
I can't bind actions to events while loading main page, because objects containing them are loaded only after main page onload
event.
Help me, please!
Thanks in advance, Mike.