I have one page there are four gridviews in one page. When i click on any pagination page button (ex : 1,2,3,4,5,6) It takes me to that page without any problem [via ajax]. And replaces new html with old html. But now when i click on pagination button it just redirects to the url. It do not get loaded via ajax. Whole page gets refreshed.
It works when on click of one page button.If i initialize through console. Like when i put this and press enter in console then It will work for next page call. And for again i have to initialize via console to make it work for next page button press.
$('#answer-grid').yiiGridView({'ajaxUpdate':['answer-grid'],'ajaxVar':'ajax','pagerClass':'pager','loadingClass':'grid-view-loading','filterClass':'filters','tableClass':'table table-responsive','selectableRows':1,'pageVar':'saved_card_id_page'});
I try to add script in ajax loaded copntent but it did not worked. Not event Alert got excuted.
<script type='application/javascript'>
alert("This is also not getting executed. When it comes from ajax content.")
</script>
I know may be they strips down the all content except the gridview div. But the same thing works in other project.
Aucun commentaire:
Enregistrer un commentaire