Limit Sum Value of Multiple Input Fields
<p>I need some help with javascript or jQuery.</p>

<p>I have three (3) input fields that I want to filter (sum of three fields).</p>

<p>the total value of 3 input fields is must 100. If the user fills more than 100, it will be automatically change the value that the total is 100.</p>

<p>you can see <a href="http://jsfiddle.net/D5F3p/" rel="nofollow">this example</a></p>

<pre><code>&lt;input type="text" name="text1" size="3"&gt; text1&lt;br /&gt;
&lt;input type="text" name="text2" size="3"&gt; text2&lt;br /&gt;
&lt;input type="text" name="text3" size="3"&gt; text3&lt;br /&gt;

    &lt;p&gt;The maximum value of total 3 fields above is 100.&lt;/p&gt;
    &lt;pre&gt;example 1 :

    text1 : 20;
    text2 : 30;
    text3 : 50; (will automatically filled with 50 because the total value must 100)&lt;/pre&gt;
    &lt;pre&gt;example 2 :

    text1 : 37;
    text2 : 60;
    text3 :  3; (will automatically filled with 3 because the total value must 100)&lt;/pre&gt;
</code></pre>

<p>Thanks for helping me,
I need it :)</p>
