Well, I tried creating one using jQuery and Ajax with some simple lines of code. Refresh a Div every 5 seconds using jQuery Free Source Code & Tutorials.
I got this code from a website which I have modified to my needs:
In test.php:
So I want test.php to be called every 5 seconds in links div. How can I do this right?
Try using setInterval
and include jquery library
and just try removing unwrap()
UPDATE
you are using a jquery old version so include the latest jquery version
Kanishka PanamaldeniyaKanishka PanamaldeniyaTry to not use setInterval
.
You can resend request to server after successful response with timeout.
jQuery:
sendRequest(); //call function
you can use this one.
you java script code should be like that.