P
P
PetrovAnto2020-05-10 00:03:12
JavaScript
PetrovAnto, 2020-05-10 00:03:12

How to update block content without reloading?

I have this piece of code

if (status['total_count'] < 1) {
                location.reload();
            }

How can I change it so that any change to ['total_count'] will update the content without reloading the page?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dubolom Unicellular, 2020-05-10
@PetrovAnto

In this code, this cannot be done.
There is a ready-made PJAX lib - updates pages without reloading

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question