E
E
Eugene2018-08-05 02:19:39
Yii
Eugene, 2018-08-05 02:19:39

What can be a simple filtering option without refreshing the page and are there any ready-made options?

How to do filtering without refreshing the page is known to everyone, including someone like me.
But the point is this. When changing filtering parameters. For example, the price slider changes or the "Intel Core i7" checkbox is ticked, and then the selection of laptops changes. It is clear that you need to work with Ajax or Pjax. But are there ready-made solutions so as not to reinvent the wheel?
And if you write from scratch, how is it easier to do it?
On the event of changing the value of the filtering field, should Ajax send, receive data and, based on the data in Success, already send the layout using JQuery?
Let's say the filtering will be by the price slider, by processor type, by laptop type and by screen resolution.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Artem, 2018-08-05
@evgen9586

No page refresh - only Ajax or JS frameworks (which will also use Ajax).
Not in IFRAME, in fact, in 2018, content is loaded.
It is better not to send the layout, but to send JSON, and then turn it into a layout with javascript.

M
Maxim Timofeev, 2018-08-06
@webinar

with Ajax or Pjax

Pjax uses AJAX so "or in between is not appropriate"
a gridView or listView wrapped in a Pjax widget and a form with filters. Everything is out of the box, there are a million examples on the net.
Write your Pjax and your listView, but why? It makes sense only if you need to abandon jquery in favor of vue, in other cases I see no reason to reinvent the wheel.
Who cares? At least the size of a piper. What does this have to do with it?
set of incoherent sayings.
"On the value change event" - what?
"send ajax filtering fields" - my don't understand
"receive data based on data in Succes" - everything is ok
"send layout using JQuery" - and before that, what did it all happen with?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question