A
A
axblue2016-10-03 23:59:43
Yii
axblue, 2016-10-03 23:59:43

How to select category elements without page reload?

Hello. Tell me how to implement it: There are categories on the site, without reloading the page, you need to select the elements of the corresponding category when you click. The second day is how I study yii. While I was able to make a crutch through ajax. When clicking on a category, I just got the category id (li) and sent this id to the controller action, and there I already made a selection from the database by the category id, but I don’t like to write in a crutch. Therefore, I ask how to do it correctly) Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2016-10-04
@leshikgo

Goodnight.
Why do you call using ajax a crutch?
Use Pjax , comes with yii2.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question