Calling a function in javscript defined under a separate script from a 2nd script
<p><strong>Question:-</strong></p>

<p>How can I call a function defined under a different script in the same javascript file from another function in a different script ?</p>

<p><br></p>

<p><strong>Explanation:-</strong></p>

<p>So I have 2 scripts in the same javascript file (default.aspx)</p>

<p>I have one script that does a jquery...</p>

<pre><code>$.Ajax { .... OnScucess: Onsuccess () function}

Onsuccess() { call another function called date_label() }
</code></pre>

<p>This <code>date_label()</code> function is defined in a separate script... where there is a function called</p>

<pre><code>timeLine(){ within it is the function date_label() {....} }
</code></pre>

<p>Now when I try to call date_label in my <code>Onsuccess()</code> function I get an obvious error message - undefined. But I believe there must be someway to make it work. Any ideas?</p>

<p>I was looking at this:-</p>

<p><a href="http://answers.unity3d.com/questions/11206/call-a-function-in-a-different-script-using-javasc.html" rel="nofollow">http://answers.unity3d.com/questions/11206/call-a-function-in-a-different-script-using-javasc.html</a></p>

<p>but I dont have names for my script tags...</p>
