I have a problem with an Input.
here's my html/php code :
$dotation = ($ig["dotation"]) ? $ig["dotation"]: '<input type="text" class="datepickerIG" name="igDota" size="8" value="test"/>';
$bo .= '<tr style="background-color: black;">
<td class="dot">' . $dotation . '</td>
<td class="modif" ref="' . $ig["id"] . '"><a href="#">Modifier</a></td>
here's my js code :
var dot_cha = $(this).parent().find('.dot').val();
my question is, why var dot_cha is always empty ?! when I use .html insteed of .val, I get the right so, where's my error ?
Thanks.
I would say that the problem is a
<td>
doesnt have a value, it contains HTML.That would be why .html works and .val doesnt.
You use .val on inputs that have values, but
<td>
is not an input its just a HTML tag.