Jump to content

Reload


Ache

Recommended Posts

Yes, but not the way you're thinking of. Once the document has been included, and the whole page downloaded to the browser, PHP is done, and there is no way for the browser to tell which part was in the include file and which part wasn't.What we used to do to accomplish this task was to put the reloadable content in an iframe. But (1) iFrames are tacky, and (2) an iFrame requires a complete HTML document, which can slow down the process.What we do now is AJAX. Your javascript sends a request to the server (which treats it like any Post request) and the server sends back only as much data as your requested. NOT a complete HTML document. Could be just a 1 or a 0. Could be a table. In your case, you would probably overwrite the innerHTML of a <div> with the response data. And the whole point is that the technique goes on in the background, without the whole page reloading.There are AJAX tutorials everywhere. I suggest mastering the technique with small test documents before you try to integrate it into your current project.

Link to comment
Share on other sites

I suggest mastering the technique with small test documents before you try to integrate it into your current project.
I definatly will do that, after I have (somewhat) mastered PHP LOLIn the mean time I will use a Javascript that I manually change.Very much thanks for your response though.I really apreciate it and I definatly will look into it when I know more about PHP.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...