Jump to content

Looking For Help In Partial Page Rendering


sughan_90

Recommended Posts

Hi,

Im new to ajax. i have to use partial page rendering(PPR) techique to complete my project.

 

Project Description:

  • im doing a livescore system. what i plan is the client site should get the latest score once it has been uploaded by admin in database. This score update should not refresh the complete page.
  • This is something like facebook upadate peoples comment on a post while we seeing it.
  • the notification numbers in facebook automatically increase whn people comment or like for us even we didnt reload the page.

 

Need help:

 

i need help to create this system. how to auto trigger the PPR in client site to get latest score in Database once it has been inserted.

can anyone help me doing this? is there any related tutorial videos to refer?

 

Thanks in advance :)

Link to comment
Share on other sites

Basically, there are libraries out there like jQuery which make it easy to do what it is you are wanting.

 

How it will work:

 

Let's say you have a <div></div> container for the portion of the page that displays your score stuff that needs to be updated. In that <div></div> you need the contents of showscores.php which has the score information. Your ajax script will pull that information and replace whatever is in that <div></div> with the new content. You'll set a repeating timer to do this on a set interval. This means that every x number of seconds, your ajax script will get the contents of showscores.php and put it into the <div></div>. If there was a change, your users will see the change.

 

Going the ajax route will require that your users have javascript capable browsers and that javascript is enabled.

 

There is another option called reverse ajax, but it requires special software to implement. Depending on your server configuration, this may not be a viable option.

 

If you ask more precise questions you'll get more precise answers.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.