I’m have a PHP and MYSQL based newsfeed. To get new content, the user has to refresh the page. I’m working on a push system that would update the element with new posts without refreshing the whole page. How would I go about that?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Sounds like a job for Ajax!
Also if you want to make the work really easy, use jquery. The Syntax would look something like this:
EDIT
to have the page update when a user clicks on a “show more content” link you can either use javascripts onclick function or use jquery’s built in stuff.
Regular JS:
Jquery way (much eaiser)