Update 6 error:
The 2nd and 3rd brackets must be removed.
this.submitOK = function(){
window.top.location.href = redirect;
}
}
}
Update 6
Delete
if( redirect == '' ){
showThankYouMessage();
return;
};
try{
if( parent ) {alert('parent');parent.location.href = redirect;}
}catch(e){ alert('frame');
location.href = redirect;
};
And replace with this one line: window.top.location.href = redirect;
.
this.submitOK = function(){
window.top.location.href = redirect;
}
Update 5
Remove previous alert and add two others a little further down, parent and frame.
this.submitOK = function(){
if( redirect == '' ){
showThankYouMessage();
return;
};
try{
if( parent ) {alert('parent');parent.location.href = redirect;}
}catch(e){ alert('frame');
location.href = redirect;
};
}
Update 4
At form.lib.php line 2484 (may be different due to previous edits)
Add the line alert('OK');
Then when the form is submitted, a message box 'OK' should pop up.
this.submitOK = function(){
alert('OK');
if( redirect == '' ){
showThankYouMessage();
return;
};
try{
if( parent ) parent.location.href = redirect;
}catch(e){
location.href = redirect;
};
}
end of update 4
Update 3
In form.lib.php on Line 11
define( 'PHPFMG_REDIRECT', '' );
Must be:
define( 'PHPFMG_REDIRECT', 'http://propertytaxdfw.com/thank-you-sign-up.html' );
end of update 3
Update 2
If you can find where this code is added.
function PHPFMG( formID ){
var frmID = formID;
var exts = {
'upload_control' : '',
'harmful_exts' : '.php, .html, .css, .js, .exe, .com, .bat, .vb, .vbs, scr, .inf, .reg, .lnk, .pif, .ade, .adp, .app, .bas, .chm, .cmd, .cpl, .crt, .csh, .fxp, .hlp, .hta, .ins, .isp, .jse, .ksh, .Lnk, .mda, .mdb, .mde, .mdt, .mdw, .mdz, .msc, .msi, .msp, .mst, .ops, .pcd, .prf, .prg, .pst, .scf, .scr, .sct, .shb, .shs, .url, .vbe, .wsc, .wsf, .wsh',
'harmful_errmsg': "File is potential harmful. Upload is not allowed.",
'allow_exts' : '.jpg, .gif, .png, .bmp',
'allow_errmsg': "Upload is not allowed. Please check your file type."
};
var redirect = "http://propertytaxdfw.com/thank-you-sign-up.html";
Move var redirect = "http://propertytaxdfw.com/thank-you-sign-up.html";
to above the function
var redirect = "http://propertytaxdfw.com/thank-you-sign-up.html";
function PHPFMG( formID ){
var frmID = formID;
...
Or replace redirect
with the actual URL in theis function:
Delete if( redirect == '' ){
this.submitOK = function(){
if( redirect == '' ){
showThankYouMessage();
return;
};
try{
if( parent ) parent.location.href = redirect;
}catch(e){
location.href = redirect;
};
}
Change to:
this.submitOK = function(){
try{
if( parent ) parent.location.href = 'http://propertytaxdfw.com/thank-you-sign-up.html';
}catch(e){
location.href = redirect;
};
}
end of update 2
I am not a big fan of the redirect.
Most times when a redirect is used a simple include()
or readfile()
.
The problem with a redirect is it requires the Browser to do and additional (and unnecessary) HTTP request.
Why do a redirect when it is not necessary?
In your case it will probably work where a redirect will not.
Either of these should work fine.
if( strlen(trim($redirect))){
readfile($redirect);
exit;
}
if( strlen(trim($redirect))){
include($redirect);
exit;
}
if( strlen(trim($redirect))){
echo file_get_contents($redirect);
exit;
}
UPDATE 1
The required redirect JS is not in the iFrame: https://propertytaxdfw.com/SignUpFormFiles/form.php.
Either function phpfmg_redirect_js() is not being executed in the PHP or defined('PHPFMG_REDIRECT')
is not defined, or PHPFMG_REDIRECT
is an empty string('' != PHPFMG_REDIRECT)
.
Two things to try:
Add this to the PHP:
define("PHPFMG_REDIRECT", "http://propertytaxdfw.com/thank-you-sign-up.html");
Or add this to the PHP:
echo "<script type='text/javascript'>
function phpfmg_redirect(){
var redirect = '" . addslashes(PHPFMG_REDIRECT) . "';
try{
if( parent ) parent.location.href = redirect;
}catch(e){
location.href = redirect;
};
}
phpfmg_redirect();
</script>";
When the page is created by the PHP if the above JS is found withing the existing
<script type='text/javascript'> </script>
then change the code to:
echo "
function phpfmg_redirect(){
var redirect = '" . addslashes(PHPFMG_REDIRECT) . "';
try{
if( parent ) parent.location.href = redirect;
}catch(e){
location.href = redirect;
};
}
phpfmg_redirect();
";