javascript - Redirect and reload -


i using javascript code redirection:

window.location.href = '/zona-privada?message='+data; 

i working php backend, after redirect, php not getting message parameter. if reload page after has been redirected works fine. should redirect in different way? or doing wrong?

this redirection doing in javascript of ajax request. thank much

ajax code:

$.post(   "/url" ).done(   function(data){     window.location.href = '/home?message='+data;   } ); 

my php (using zend1)

if($this->_params['message']) {    //code goes here } 

the problem value of variable .try encodeuricomponent(data) before appending window.location.href


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -