title: how to call javascript function in main document from within iframe (ckeditor plugin)
body: <p>I've built a simple CKeditor 3 plugin with one button that should just call a JS-function when somebody clicks it.</p>
  
  <p>The plugin (code when somebody clicks) looks like this and is working:</p>
  
  <pre><code>var openAssetsBrowser = {
      exec:function(editor){
          openAssetsBrowser();
      }
  };
  </code></pre>
  
  <p>I always get the error "openAssetsBrowser is not a function"</p>
  
  <p>The function itself is somewhere in the page, I thought the order shouldn't matter since the whole page is read first, before anyone would lclick the ckeditor button that triggers the function</p>
  
  <p>Calling it on a link somewhere (e.g. with jquery) in the page just works:</p>
  
  <pre><code>$("a#linkOpenFileManager").click(function(){
      openAssetsBrowser();        
          return(false);      
  });
  </code></pre>
  
  <p>Does anyone know why the function cannot be called from within the CKeditor plugin?</p>
  
  <p>update: when pasting the complete function code instead of "openAssetsBrowser();" in the plugin, all works, but that's not really re-usable code...</p>