change text of asp.net button with javascript
<p>I have a form submit button that has asp.net validators hooked up to it. If I make a javascript function to change the text to processing on click it does not work. The button flags the validators and also causes the whole page to post back. Heres the code I have:</p>

<p>C#</p>

<pre><code> protected void Page_Load(object sender, EventArgs e)
{
    btnPurchase.Attributes["onClick"] = "submit()";
}
</code></pre>

<p>Html</p>

<pre><code>&lt;script type="text/javascript"&gt;
    function submit() {
        document.getElementById("ctl00_ContentPlaceHolder1_btnPurchase").value = "Processing";
    };
&lt;/script&gt;
</code></pre>

<p>My goal is to change the buttons text to purchasing onclick if the form passes validation, and then in my code behind it will change back to the original value once the form posts back.</p>
