Skip to content
Snippets Groups Projects
Commit dae91a0e authored by hahn's avatar hahn
Browse files

- footer navigation in actions was simplified

- fetch output instead of fille $sPhpOut
- ajax test No. 6

!!! DO NOT DEPLOY ON LIVE !!!
parent 00c2677c
No related branches found
No related tags found
No related merge requests found
......@@ -35,21 +35,22 @@ if (array_key_exists("confirm", $aParams)) {
;
$sUrlStartAction = $sUrl . "&run=1";
// im Hintergrund Prozess ankicken
// start action as background process
if (array_key_exists("run", $aParams)) {
echo $oPrj->build($sOutDir . "/" . $aParams["ajax"]);
die();
}
// read produced content from tempfile
if (array_key_exists("ajax", $aParams)) {
echo "<h2>processing ... please wait ...</h2>" . date("H:i:s");
echo "<br>Ausgabe von ".$sOutDir."/".$aParams["ajax"] ."<br>";
echo file_get_contents($sOutDir . "/" . $aParams["ajax"]);
$sLine="<h2>processing ... please wait ... " . date("H:i:s")."</h2>";
$sOut=file_get_contents($sOutDir . "/" . $aParams["ajax"]);
echo $sLine . $sOut . $sLine;
die();
}
$sOut.='<div id="' . $sDivname . '">Moment...</div>'
$sOut.='<div id="' . $sDivname . '"></div>'
. '<script>
var iRepeat=1000
var iRepeat=3000
// init process
$.post( "' . $sUrlStartAction . '", function( data ) {
$( "#' . $sDivname . '" ).html( data );
......@@ -58,6 +59,7 @@ if (array_key_exists("confirm", $aParams)) {
// polling result so far ...
function AjaxPolling(sUrl, sDivname){
if (!iRepeat) return false;
$.post( sUrl, function( data ) {
if (iRepeat) {
$("#"+sDivname ).html( data );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment