I have filter-from with ajaxSubmitButton.
CHtml::ajaxSubmitButton('Show',Yii::app()->createUrl('office/ajaxFilter'),array('update'=>'#office-install'),array('id'=>'filterSubmit'))
And i want to submit it on pageLoad (to recive data using default filter values). How to trigger click on ajaxSubmitButton?
using
$(document).ready(function () {
$('#filterSubmit').trigger('click');
}
raise redirect.
If I understand your problem correctly, you need to trigger the click on
#filterSubmitelement to run some actions associated with it, but without having the page following the regular click, if so:UPDATE YOUR CODE TO THIS:
This assumes that you have some click events binded to the
#filterSubmit… If that is not the case, perhaps a more elaborated question cold allow us to help you out!EDITED
By the comment you’ve just post, you can do something like:
YOU CODE (with a minor fix):
WITH Yii Framework