Here is my HTML code :
<input type="text" name="Estimation1" id="Val1" maxlength="3" disabled=true/>
<input type="text" name="Estimation2" id="Val2" maxlength="3" disabled=true/>
<input type="text" name="Estimation3" id="Val3" maxlength="3" disabled=true/>
<input type="text" name="Estimation4" id="Val4" maxlength="3" disabled=true/>
And My jQuery :
function CalculAuto()
{
// get the values from this row:
var val1 = $('#Val1').val();
var val2 = $('#Val2').val();
var val3 = $('#Val3').val();
if (val1=="") val1=0;
if (val2=="") val2=0;
if (val3=="") val3=0;
var total = 100 - ((val1 * 1) + (val2 * 1) + (val3 * 1));
// set total for the row
$('#Val4').attr('value', total);
}
My problem is : when I send my form, $_POST['Estimation4'] is not recognized.
I don't understand why ??
ajaxcode or the code through which you send your values.$_POST, change to<input type="text" name="Estimation4" id="Val4" maxlength="3" readonly />instaed