EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: slavok47 on May 18, 2015, 02:20:21 AM



Title: problem Location: .php
Post by: slavok47 on May 18, 2015, 02:20:21 AM
Hello everyone!
please tell me how to perform a redirect to the page condition

example:
Code:
function submitForm(){
            $('#ff').form({
    url:'.php',
    onSubmit: function(param){
        param.p1 = 'submit';       
    },
    success:function(data){
        $.messager.alert('Error',data,'error');
    }
});
// submit the form
$('#ff').submit();
        }

end PHP

Code:
if {
header("Location: index.php"); exit();   
}
else
{
echo <<<INFO
Error
INFO;
}

in this form, a page in a message box


Title: Re: problem Location: .php
Post by: yamilbracho on May 18, 2015, 02:20:06 PM
try
if {
ob_clean();
header("Location: index.php");
exit();   
} else {
echo <<<INFO
Error
INFO;
}


Title: Re: problem Location: .php
Post by: slavok47 on May 19, 2015, 04:45:57 AM
unfortunately it does not help, call forwarding is still in a message box