Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

just need an example not a full website just using PHP and ajax timer function so i can display the new post in the top

just need an example not a full website just using PHP and ajax timer function so i can display the new post in the top and remove the old one from the bottom of the page

3. Periodically checking for new posts Using one of the timer functions in JavaScript, make the user initial page dynamically check back with the server to see if there are any new posts using AJAX. In order to avoid sending the full list of posts back each time, you should keep track of the date/time when the page was loaded or most recently updated, and use this to ensure that only new information is sent back. Keep in mind that the process of inserting new posts into the page may require a non-trivial amount of programming to ensure that all of the required pieces are put in their proper location (e.g., embedded div tags). Since the system is designed to show ten posts per page, this dynamic updating should only occur on the first page of the posts. As new posts are added, the old ones should be removed from the bottom to ensure that the page continues to only show the ten most recent posts (and their associated replies).

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning C# 5.0 Databases

Authors: Vidya Vrat Agarwal

2nd Edition

1430242604, 978-1430242604

More Books

Students also viewed these Databases questions

Question

Where those not participating, encouraged to participate?

Answered: 1 week ago

Question

3. Who would the members be?

Answered: 1 week ago