$('.textedit').editable('/challenge/skeleton/textedit/textedit/process', {
loadurl: '/challenge/skeleton/textedit/textedit/loadraw',
loaddata: {id: $(this).attr('id'), client: $(this).data('client')},
submitdata: {id: $(this).attr('id'), client: $(this).data('client')},
....
});
$('#textedit_footer').data('client', 5);
$('#textedit_home1').data('client', null);
$('#textedit_test').data('client', 3);
$('#textedit_userCreate').data('client', null);
My problem lies with the GET data being sent. The 'id' data gets sent appropriately, but the 'client' data does not. I think I am using data() the wrong way but can't put my finger on it. Any suggestions? Or any suggestions on how to do this in a better way? Here is an example of one of the divs:
<div class="textedit" id="textedit_home1">
<p>test</p>
</div>
All the .textedit elements are edit-in-place features. When the data is submitted (specified in submitdata and loaddata), two data packets should be sent to the server so that it knows how to process it: the first is the id of the edit-in-place, which is stored as the id of the element (this part works). The second piece of data I call the 'client'. The only way I can think of the browser to know which elements have which client is via data(). But some reason my implementation is not working. The 'client' data is simple not sent, that's what's wrong.