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
Post a Comment