Tab is dead after close print popup window in mvc

Posted by Kumaran under ASP.NET MVC on 5/22/2014 | Points: 10 | Views : 677 | Status : [Member] | Replies : 2

$(document).ready(function () {
$('#btn_print').click(function () {

var tbl = $('#tbl_printbox').html();
var w = window.open('', 'pactrak', 'width:1000,height:500');
w.document.write(tbl);
w.print();
return false;
});

});

this is code which will print div page.when i close print pop window in chrome tab is dead




Responses

Posted by: Vuyiswamb on: 5/23/2014 [Member] [MVP] [Administrator] NotApplicable | Points: 25

Up
0
Down
What do you mean when you say Dead ?

Thank you for posting at Dotnetfunda
[Administrator]

Kumaran, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Kumaran on: 5/24/2014 [Member] Starter | Points: 25

Up
0
Down
yes.when i close the print popup window in chrome i can't redirect to another page.but when i copy url and paste into another its working fine.so what to do?please someone help me
e.x
var tbl = $('#tbl_printbox').html();

var w = window.open('', 'test', 'width:1000,height:500');

w.document.write(tbl);

w.print();
window.location.href='www.facebook.com';
return false;

Kumaran, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response