Reputation: 8575
this is my code:
function(id) {
id=$.fn.yiiGridView.getSelection(id);
console.log(id);
jQuery.ajax({
'url':'/index.php?r=client/loadOne',
'data':id,
'cache':false,
'success':function(html){jQuery(
".portlet-60 .portlet-content")
.html(html)}});
and it gets me this output in console:
["2"]
index.phpGET http://127.0.0.4/index.php?r=client/loadOne&undefined=undefined 500 (PHP Error)
I don't understand why id in console equals "2", bud in ajax data is undefined.
Upvotes: 0
Views: 656