Harshal Borse Harshal Borse - 1 year ago 162
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 ?

Answer Source
 '<?php echo $this->Html->url(array('controller' => 'Dashboard', 'action' => 'index')); ?>',
 '_blank' // <- This is what makes it open in a new window.
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download