how do i bring the tr value into .click event? i want to be able to pass the tr id into updatedb.php as well- for sql updating
enter
<head>
<script src="jquery-1.3.2.min.js" type="text/javascript"></script>
<script src="jquery.jeditable.mini.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
var global= ""
$('.click').click(function() {
var $this = $(this);
var $tr = $this.closest('tr');
alert($tr.attr('id'));
global= $tr.attr('id');
});
$('.click').editable('updatedb.php?test=123', {
indicator : "<img src='indicator.gif'>",
tooltip : "Click to edit...",
onblur : 'submit',
style : "inherit"
});
});
</script>
</head>
<body>
<tr id=1>
<td>
<span class="click" style="display: inline">Funny click here testing!</span>
<br />
</td>
</tr>
<tr id=2>
<td>
<span class="click" style="display: inline">Second inline!</span>
</td>
<tr>
</body>
</html>
here
Hi, jeditable don't have successor. I finally manage to get the value into global. But now facing another issue. Jeditable doesn't allow me to pass in extra value...
I tried editable('updatedb.php?test=123' then echo "START" . $_POST['test'] . "END"
I also tried other way, not working.