Make an AJAX request to the current controller in Yii.

Make an AJAX request to the current controller in Yii.

Last updated:

This is how you'd make an AJAX request to the current controller in Yii.

    $.post('',{ajax_filter_info: filter_info});

Where filter_info is the variable with the text you want to send to the controller.

EDIT:. Some time ago I noticed that empty urls(like what I've used here) may cause some trouble on IE browsers. I am not sure whether this is still the case but, just in case it still is, it might be better to use location.href rather than "" as the url here.