PDA

View Full Version : Error after print using window.print



vinothkumarsk
06-12-2008, 11:57 AM
Hi,
Im using window.print() method to print part of the page in my application.

Code:
function print()
{
var newstr = document.all.item('ctl00 _Detail_divCrossRef').innerHTML;
var oldstr = document.body.innerHTML;

document.body.innerHTML=newstr;
window.print();

document.body.innerHTML = oldstr;
}
But after the print operation doPostback method is not working.
Im getting javascrip error message as theForm.__EVENTTARGET and theForm.__EVENTARGUMENT is null or undefined.
Im printing only the divCrossRef of the page.
Please any one help me to solve this error.