ExternalInterface call not working

Hello everyone,
I have a flash file which triggers a window containing my simple editor, upon the click of “Ok” button in editor window, i want editor data to get transferred back to my flash file using externalInterface call, but it fails.I can’t see anything in my flash text areas although i can alert the editor data using javascript.