Javascript Scope Problem
<p>Sorry for asking, but how do I access <em>myFunction()</em> from <em>someFunction</em>()?</p>

<pre><code>&lt;script&gt;
$(document).ready(function() {
    // Get messages
    var myFunction = function() {
      // doSth.
    }

    // Make the initial call on page load.
    myFunction();
);

function someFunction() {
    // Call the function a second time 
    myFunction();  // Call fails!
}
&lt;/script&gt;
</code></pre>
