convert server side vb.net to client side javascript
<p>I've got a function I wrote quite some time ago that works fine, but I'd like to speed up the process and lessen server load by doing the same job in Javascript.</p>

<p>I seem to be able to GET textbox values ok, but I can't seem to SET textbox values (I'm'-a JS noob).  Can anyone lend a hand in converting my VB.NET code to it's JS equivalent?</p>

<pre><code>Protected Sub txtSellingPrice_TextChanged(ByVal sender As Object, ByVal e As EventArgs) _
    Handles txtSellingPrice.TextChanged

    Dim SellingPrice As Double = Double.Parse(txtSellingPrice.Text.Replace("$", ""))
    Dim BallanceSheet As Double = If(txtBalanceSheet.Text = "", 0, Double.Parse(txtBalanceSheet.Text.Replace("$", "")))
    Dim DownPayment As Double = If(txtDownPayment.Text = "", 0, Double.Parse(txtDownPayment.Text.Replace("$", "")))

    txtGoodWill.Text = SellingPrice - BallanceSheet
    txtBalance.Text = SellingPrice - DownPayment
    txtSellingPriceMult.Text = SellingPrice

End Sub
</code></pre>

<p>I've got this so far, but I'm not sure how to get much further.</p>

<pre><code>function txtSellingPrice_OnChange() {
    var txtSellingPrice = document.getElementById('&lt;%=txtSellingPrice.ClientID %&gt;')
    var txtBalanceSheet = document.getElementById('&lt;%=txtBalanceSheet.ClientID %&gt;')
    var txtDownPayment = document.getElementById('&lt;%=txtDownPayment.ClientID %&gt;')


}
</code></pre>
