Search code examples
phpajaxyiitablesorter

yii table sorter customize ajaxurl


I have my code:

ajaxUrl : '<?php echo Yii::app()->createUrl("abc/def");?>&page={page}&size={size}&{sortList:col}&{filterList:fcol} ',

source :

http://mottie.github.io/tablesorter/docs/example-pager-ajax.html

and it did work, but then in yii manager url we clean the url format so, we remove index.php in url, so it didn't accept unnual $_GET anymore.

My current code is:

            ajaxUrl : '<?php echo Yii::app()->createUrl("abc/def",array("page"=>"{page}"));?>',

but it didn't return the unnual page(just sample so I just use one parameter. Another try is:

            ajaxUrl : Yii.app.createUrl('abc/def',{page:page,size:size,sortList:col,filterList:fcol}),

and the result is nothing, I was trying using yii with javascript but another fail. I think the problem is the value when in value is set to be javascript, but when I'm input in array createurl it was just string.

Can anyone help me?


Solution

  • Sory if it's too technically,,

    it's solved with change & to ?

    code :

    ajaxUrl : '<?php echo Yii::app()->createUrl("Dasboard/DataAds");?>?page={page}&size={size}&{sortList:col}&{filterList:fcol} ',//{filterList:filter}&{sortList:column}',