Harshal Borse Harshal Borse - 4 months ago 9x
Ajax Question

Window.location.href() redirection

Ajax redirection in success response

success: function(json) {
if(json.status == "success")
window.location.href = "<?php echo $this->Html->url(array('controller' => 'Dashboard', 'action' => 'index')); ?>";

I am trying to redirect the page in ajax success response, It is redirecting properly. but I want the page to be open on new window. How can i do that ?

 '<?php echo $this->Html->url(array('controller' => 'Dashboard', 'action' => 'index')); ?>',
 '_blank' // <- This is what makes it open in a new window.