How to acces a global JS-Object in another .js-File
<p>How do i acces an object which was initialized in my HTML-Document?</p>

<p>My HTML-Document looks like this:</p>

<pre><code>    ...

&lt;script type="text/javascript" id="controller"&gt;var controller = false;&lt;/script&gt;

    ...

&lt;body onload="controller = new CTRLclass()"&gt;

    ....
</code></pre>

<p>How do I call controller.doAMethod() in an external Javascript-File using DOM-Operations or simmilar?</p>

<p>edit:
PPL, i have many .js-Files and my controller is creating an instance of another class in his constructor. In the created instance of the class i need acces to the controller to call an update-Function.
Like: controller -> creates instance of class.
class -> needs to call controller.update().
How do i acces controller in 'class' - Thats all</p>

<p>THX!</p>
