i have a text box and i try to get value like this
var comment = $("input#diaMissedPucomments").val();
but the value is not fetched at the same time i have used this
$('input:checked').each(function() {
selectedValues =$(this).val()+","+selectedValues ;
});
to get values of selected check boxes it works fine.
<div style="display:none;" id="diaMissedPU" title="Missed P/U Comments" >
<table>
<tr>
<td>Enter Comments : </td>
<td><input tyep="text" id="diaMissedPucomments" name="diaMissedPucomments" /></td>
</tr>
</table>
</div>
the above is the HTML and i want to get the value of diaMissedPucomments
how to do this.
Pleas help me to get this.
Best Regards
It’s just a mistyped
tyepand must be fixed totypemust be
DEMO:
http://jsfiddle.net/vnKza/1/
As dakait says enclose your Jquery codes to a Jquery ready handler