Select Dropdown Pjax

Is there a way to return data on change using Pjax.

Basically when the page loads there will be a table populated by a simple query. When the dropdown is changed i want it to over-right the table with the new data from the query.

Also what is the best way to have 3-4 roles for user so they have access to different pages and have a different menu based on their role. I used the advanced template login template so in my DB I have a role column which is set to 10 as the default.

How do i set the rules() on the controller for the pages to accept minimum role level so eg admin is 30, but can see everything, but normal role of 10 can only see specific pages. Or would the pages need to have dynamic rules so they can be changed on the fly?

I have seen the guide for authorisation, but im still puzzled. So advice would be much appreciated.

Many Thanks

Matt

I don’t think the pjax widget supports this type of thing. I think it handles pjax request when clicking links or form submissions but in this situation you need to work with the onChange event. I just implemented this myself but I wrote my own script using jquery.