I have input box txtRefreshInterval which allow only integer.
<td><span class="sfFormlabel">Refresh Interval</span></td>
<td><input type="text" id="txtRefreshInterval"/> </td>
I validate it like this.
$('#txtRefreshInterval').keydown(function() {
if (isNaN($('#txtRefreshInterval').val())) {
//$("#lblError").html("<br/>Please Enter Integer Value.");
return false;
}
});
It works fine.In html there is not any lblEroor.I want to append lblError if and only if input box have not integer through code.
append:
<label id='lblError'>
and display message.But I am not find correct way to append
<label>
after
txtRefreshInterval.
Thanks.
1 Answer