Assign Resulted Value to Third TextBox Using jQuery
<p>i have three textboxes. I want to get the value from the first 2 textboxes, calculate the value and then assign the result to the 3rd textbox. To achieve this, i have done something like following in jquery;</p>

<pre><code>&lt;script type="text/javascript"&gt;
   $(document).ready(function myfunction() {
        $("#TxBx_MarksObtained").change(function () {
            //var value = $(this).val();
            var a = $("#TextBoxTotalMarks").val();
            var b = $("#TxBx_MarksObtained").val();
            var c = (b * 100 / a).toFixed(2);
            $("#TextBoxMarksInPercent").val(c);
        }); 
    });
&lt;/script&gt;
</code></pre>

<p>Now, the problem is, when i focus on <code>TextBoxTotalMarks</code> and enter the value, and for <code>TxBx_MarksObtained</code> too, Everythings works great and the result is assign to <code>TextBoxMarksInPercent</code>. <br />
However, when i change my focus to another textbox (somewhere else in form) and then come back and change the value of <code>TextBoxTotalMarks</code> and <code>TxBx_MarksObtained</code>. I dont see any changes in <code>TextBoxMarksInPercent</code>. <br />
<strong>What i am getting wrong? <br />
Why my value isn't updated after comming back from another textbox?</strong></p>
