how to call another function in javascript?
<p>how do i call the doSubmit() function from the conFirmUpload() when the confirm msg box is true?   </p>

<pre><code>&lt;script type="text/javascript"&gt;
    function confirmUpload() {
        if (confirm("Are you sure want to upload '" + document.getElementById("txtWS").value + "' ?") == true) {
            return true;
        }
        else
            return false;
    }

    function doSubmit(btnUpload) {
        if (typeof(Page_ClientValidate) == 'function' &amp;&amp; Page_ClientValidate() == false) { 
            return false;
        }    
        btnUpload.disabled = 'disabled';
        btnUpload.value = 'Processing. This may take several minutes...';
        &lt;%= ClientScript.GetPostBackEventReference(btnUpload, string.Empty) %&gt;;    
    }
&lt;/script&gt;
</code></pre>
