I am not good at JS or jQuery. I take the follow code for better explaining what I what. When a user input 400 or more to triglycerides, the LDL is autopopulated with 'N/A'. How do I implement JS or jQuery to do that? Thanks
<form>
<input name='triglycerides" value="" />
<input name='LDL' value="" />
</form>
My actual code is as follows:
$('#ldl_override').keyup(function(){
var val = parseInt($(this).val());
if(val > 399)
$('#qIn726').val('N/A');
});
elseif($ldl_override && $questionID == 728)
{
$question .= "<input $maxLengthString id=\"ldl_override\" name=\"field[" . $questionID . "]\" type=\"text\" value=\"" . htmlspecialchars($answer) . "\" />\n";
}