I am new to js and ajax.
I want a code that calls a disp.php file and display its output in load.php. The ajax code should pass a value from load.php to disp.php and there must be a five second delay between each call.
Basically I want to replace the below php code which will fail due to script timeout. load() and disp() are functions of disp.php
require("disp.php");
for($i = 1; $i <= $pt[1]; $i++)
{
load($mat,$i);
disp();
sleep(5);
}