i am getting the following error when i try to close a window opened through client side before print dialog appears.
Error: function expected
I am opening a window and print dialog simultaneously, print dialog is taking few seconds to open after the window. before the print dialog is opened when i close the window i am getting the error.
below is my code,
function OnClick() {
var a = window.open('', '', 'width=300,height=300');
a.document.open("text/html");
a.document.close();
a.print();
}
Thank you SpikeZ for your reply, even if i change the function name still its an issue. Issue is coming when i close the popup before print window is displayed.