Hello friends,
can we retrieve data without Ajax & With No Page Loading?
Printable View
Hello friends,
can we retrieve data without Ajax & With No Page Loading?
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.
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.