Page 1 of 1

AJAX+PHP=refresh

Posted: Fri Jul 14, 2006 4:31 pm
by matt1019
Hi everyone,

I would like to know if someone has found a way, or knows of a way to refresh a part of a page instead of the whole page using ajax.

Here's an example, in the cms I am currently using (phpfusion) there is a link to check new messages.... and I would like to update/refresh that particular part of the page only.... how can I employ AJAX in this way?


I used google, but no luck.... maybe because I am a lousy searcher?? (I used this sequence to search: "refresh+page+ajax")

any help is welcomed!


Thanks,

-Matt

Posted: Fri Jul 14, 2006 4:36 pm
by Burrito
you can use dhtml to plug in anything sent back from the server (via ajax) to any portion of the page you want.

do a search for the innerHTML property.

Posted: Fri Jul 14, 2006 4:42 pm
by R4000
easy
use sajax or something or your own ajax code

Code: Select all

<div id="WHAT EVER">
part to change
</div>
and then when you get your ajax response

Code: Select all

var _gel = document.getElementById("WHAT EVER");
_gel.innerHTML = reposnseText;
:)