Jump to content

Output Contents Using AJAX and PHP


TripleDES

Recommended Posts

Question on how to go about this.  I've created a PHP function that writes to a file which is then printed on the page using AJAX.  I'd like to run this function twice with an AJAX update after each.  However, both functions must complete before the AJAX portion is able to print to the page.  Is there a way around this?

 

myFunction();

Print contents with AJAX

myFunction();

Print again....

 

Just more information:  I'm using prototype.js for AJAX which looks something like this:

 

var myAjax = new Ajax.PeriodicalUpdater('status', 'readfile.php {method: 'get', frequency: 3.0, decay: 1});

 

And it's called by:

<div align="center" id="status"></div>

Link to comment
https://forums.phpfreaks.com/topic/113804-output-contents-using-ajax-and-php/
Share on other sites

Archived

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

×
×
  • 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.