I have an application that shows a list of items.
The user can click on an item and see its details in a modal popup (centered DIV, shown using JavaScript). I need t
Try this
function PrintContent() {
var DocumentContainer = document.getElementById('nameofDiv');
var WindowObject = window.open("", "PrintWindow",
"width=750,height=650,top=50,left=50,toolbars=no,scrollbars=yes,status=no,resizable=yes");
WindowObject.document.write();
WindowObject.document.write('')
WindowObject.document.writeln(DocumentContainer.innerHTML);
WindowObject.document.close();
WindowObject.focus();
WindowObject.print();
WindowObject.close();
}
This will print out the contents in another window using your stylesheets