This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
According to the third example in this document page. Thing works fine without parameter. But when I try to send some parameter along, I always got this message
Missing argument 1
Here is my Javascript:
$(this).request('onGetItemInfo',{data:{value:555}});
And this is my AJAX handler:
function onGetItemInfo($value)
{
return 'somedata';
}
Tried digging around for examples and into "modules/cms/classes/Controller.php", but can't find any clues.
Last updated
All that you submit, are in the array $ _POST!
There is no need to specify an argument in a function in your controller
function onGetItemInfo()
{
return post('data');
}
Last updated
Thank you d.negativa now it work without specify any argument and using
return post('value')
1-3 of 3