lvil
lvil

Reputation: 4326

PHP redirect on extjs form submission

I have an extjs formPanel for the login process, with

standartSumbit: false ... loginForm.getForm().getEl().dom.action = 'index_files/login.php'; loginForm.getForm().getEl().dom.method = 'POST'; loginForm.getForm().submit();

login.php contains:

if ( $name == '1') { header("Location: http://www.google.com/"); exit; }

But instead of redirecting I'm getting from chrome debugger

Failed to load resource www.google.com

What is the problem?

thank you.

ps: i can't use GET

Upvotes: 0

Views: 2497

Answers (1)

Natkeeran
Natkeeran

Reputation: 1749

In the success function of the extjs, try

 success:function(){ 
                      var redirect = 'http://www.google.com'; 
                      window.location = redirect;
                  },

Upvotes: 1

Related Questions