D
dan
This works in mozilla but I can't figure out why this won't work in
IE.
Say I have this html
<html>
header goes here
header goes here
header goes here
header goes here
header goes here
<div id="thecontent">
html goes here
tables etc
html goes here
html goes here
html goes here
<tag><tag><tag>
</div>
<img src="url" onclick="printIt()">
footer html goes here
footer html goes here
footer html goes here
footer html goes here
</html>
the printIt function looks like this
function printIt()
{
//grab the div in the html w/o the header & footer text
content=document.getElementById('thecontent');
//open a blank window
w=window.open('about:blank');
//write content var html to the window
w.document.write( content.innerHTML );
//write some javascript to make the newly opened window print itself.
w.document.writeln("<script>");
w.document.writeln("window.print()");
w.document.writeln("</"+"script>");
}
This will cause the print dialog to pop up in mozilla but doesnt
prompt to print in IE.
Is this a security issue?
IE.
Say I have this html
<html>
header goes here
header goes here
header goes here
header goes here
header goes here
<div id="thecontent">
html goes here
tables etc
html goes here
html goes here
html goes here
<tag><tag><tag>
</div>
<img src="url" onclick="printIt()">
footer html goes here
footer html goes here
footer html goes here
footer html goes here
</html>
the printIt function looks like this
function printIt()
{
//grab the div in the html w/o the header & footer text
content=document.getElementById('thecontent');
//open a blank window
w=window.open('about:blank');
//write content var html to the window
w.document.write( content.innerHTML );
//write some javascript to make the newly opened window print itself.
w.document.writeln("<script>");
w.document.writeln("window.print()");
w.document.writeln("</"+"script>");
}
This will cause the print dialog to pop up in mozilla but doesnt
prompt to print in IE.
Is this a security issue?