https://phspeed.com/
To redirect outside the environment of PHsPeed in an Ajax event use the function RedirectOut:
function btn_1_onClick($app){ $dt = date('Ymd'); if($dt < 'somedate') { $app->showMessage('Not yet'); } else { $app->RedirectOut('some external url','some parameters') ; }}
However, we found an error in this function. It is corrected and will be available soon but for those running into issues (you will get a PHP error when using the function in a non-ajax event), change the code in spapplication.php as follows:
public function RedirectOut($theUrl, $parms) {
if($theUrl!='') {
if(!isAjax()) {
phspRedirect($theUrl, '', $parms);
} else {
$this->redirect.=$theUrl;
$this->redirect.='?'.$parms;
}
}
}