Posted on: 4/30/2015 12:45:57 PM | Views : 591

Hi,
    I have a button in my application, which takes print of a webpage. Below is the code under that button, please look into it. Problem is, when i click on this print button, print dialog opens up. and when i click on 'cancel' button of that dialog, it comes back to application but everything strucks. Its not at all responding until i refresh. what might went wrong in the below code.
function printDiv(divId) { debugger; var divElements = document.getElementById(divId).innerHTML; var oldPage = document.body.innerHTML; document.body.innerHTML = "<html><head><title></title></head><body>" + divElements + "</body>"; window.print(); document.body.innerHTML = oldPage; }
Thanks in advance.
Regards
Swathi Nomula

Go to the complete details ...