i cant getting element value (for inlineedit)
inded.php
- while ($row = mysql_fetch_array($result)) {
echo'
<tr>
<td class="inlineEdit"><div>'.$row["id"].'</div></td>
<td class="inlineEdit"><div id="c1_'.$row["id"].'">'.$row["first_name"] .'</div></td>
<td class="inlineEdit"><div id="c2_'.$row["id"].'">'.$row["last_name"] .'</div></td>
<td class="inlineEdit"><div id="c3_'.$row["id"].'">'.$row["email"] .'</div></td>
<td class="inlineEdit"><div id="c4_'.$row["id"].'">'.$row["hire_date"] .'</div></td>
</tr>
';
}
f.js
- NewText = $(this).siblings("form").children(".edit").val();
var id = $(this).parent().attr("id");
var data = 'id=' + id + '&text=' + NewText;
$.post("update.php", data, function (response) {
$("#response").html(response);
$("#response").slideDown('slow');
slideout();
$("#loading").fadeOut('slow');
});
$(this).parent().html(NewText).removeClass("selected").bind("click", updateText);
});
$(".revert").live("click", function () {
$(this).parent().html(OrigText).removeClass("selected").bind("click", updateText);
});
function updateText() {
$('li').removeClass("inlineEdit");
OrigText = $(this).html();
$(this).addClass("selected").html('<form><textarea class="edit">' + OrigText + '</textarea> </form><a href="#" class="save"><img src="images/save.png"/></a> <a href="#" class="revert"><img src="images/cancel.png"/></a>').unbind('click', updateText);
}
});
when i push ok button it is null (like you see in pic .)
