Yii Framework Forum: Pjax.reload With Post Url? - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Pjax.reload With Post Url?

#1 User is offline   rawlly 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 46
  • Joined: 25-April 13

Posted 13 July 2014 - 01:39 PM

Hello

var dataString = "keyword=" + search_input;
$.pjax.reload({container: "#mycontainer-pjax", timeout: 2000, url: "/controller/index?" + dataString });


Does anyone know if the above pjax reload can be done through POST to the url?


Regards,
Dennis
0

#2 User is offline   rawlly 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 46
  • Joined: 25-April 13

Posted 05 September 2014 - 04:34 PM

not possible with post?

the problem is calling a different controllers action when in a modal results in the url in address bar changing from original page to the one called to refresh the pjax container and makes a mess.

any other ideas for refreshing a listview in a modal?

Dennis
0

#3 User is offline   Hitesh B 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 19-September 13

Posted 23 May 2017 - 12:40 PM

I know that i am replying to a very old post but it may help someone:

add replace: false

Here is what I am doing and it seems to be working
$.pjax.reload({container: \'#pjaxNotes\', replace: false, url:\''.\yii\helpers\Url::to(['notes','id'=>$user->id]).'\'});
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users