PDA

View Full Version : can we retrieve data without Ajax & With No Page Loading?



astrologyforlove
10-18-2019, 03:23 AM
Hello friends,
can we retrieve data without Ajax & With No Page Loading?

RuskinF
05-11-2020, 07:24 AM
If your goal is to refresh the page data without refreshing the page, you can put your code in an interval timer and let it auto refresh every x seconds, like below.

setInterval(getAnswer(), 1000);
note: setInterval fires again and again until you clear it, while setTimeout only fires once.

Unfortunately, you have to use Ajax to retrieve data.

Regards.

RuskinF
07-06-2020, 05:20 AM
If your goal is to refresh the page data without refreshing the page, you can put your code in an interval timer and let it auto-refresh every x seconds, like below.

setInterval(getAnswer(), 1000);
note: setInterval fires again and again until you clear it, while setTimeout only fires once.