jquery jeditable pass multiple values...
- by Scott
Alright totally new to jeditable,
Say I have some <div>'s and <input type='hidden' /> items that are generated dynamically with PHP like this:
<?php while($row = $db->fetch_assoc($query)) : ?>
<input name="hiddenID" type="hidden" value="<?php echo $row['id'] ?>"
<div class="items"><?php echo $row['item']; ?></div>
<?php endwhile; ?>
Which gives me say...this:
1 //hidden value
item1
2 //hidden value
item2
3 //hidden value
item3
And a jeditable inline-edit script to go along with it:
hidden = $(".items").siblings("[name=hiddenID]").val(); //using a global var..don't know how to pass it into the editable function.
$(".items").editable('save.php', {
type : 'text',
tooltip : 'Double-Click to edit...',
onblur : 'submit',
event : 'dblclick',
submitdata : function() {
return {id : hidden }; //how do I pass mutiple hiddenID values??
}
});
I am wondering how to pass multiple values into the editable function. The way I've shown here only passes one value...the first row.