Thank in advance first.
Following it the problem:
1. I have one html shown
2. I want this: when user click a button, then go server side to generate a pdf file, and automatically show the IE print dialog.
My current way is this:
1. when use clicks the button, let one iframe change its src
iframe1.src='pdfGeneratorURL?...'
2. on iframe set onload='printPDF()';
3.
function printPDF(){
var dc=document.getElementById(iFrame');
alert(dc);
var acrobat = dc.contentWindow.document.applets["objPdf"];
alert(acrobat);
if (acrobat != null && acrobat != undefined){
acrobat.Print();
}
}
OK it works on w2000, but not WinXP, the 2 alert() works fine, but just dont print....
HELP guys please.
Following it the problem:
1. I have one html shown
2. I want this: when user click a button, then go server side to generate a pdf file, and automatically show the IE print dialog.
My current way is this:
1. when use clicks the button, let one iframe change its src
iframe1.src='pdfGeneratorURL?...'
2. on iframe set onload='printPDF()';
3.
function printPDF(){
var dc=document.getElementById(iFrame');
alert(dc);
var acrobat = dc.contentWindow.document.applets["objPdf"];
alert(acrobat);
if (acrobat != null && acrobat != undefined){
acrobat.Print();
}
}
OK it works on w2000, but not WinXP, the 2 alert() works fine, but just dont print....
HELP guys please.