hi,
i called an iframe using ajax onto the current page and tried to print the page but is printing blank page can somebody help me with this
what i did was: current page:
<input type="button" onclick=verifyControl('1001') >
<div id='pa_print'></div>
js file function:
function verifyControl(rNo) {
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null) {
alert ("Your browser does not support AJAX!");
return;
}
var url="js/p_Print.php";
url=url+"?control_no="+rNo;
xmlHttp.onreadystatechange=paymentPrintVerify;
xmlHttp.open("GET",url,true);
xmlHttp.setRequestHeader("If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT");
xmlHttp.send(null);
remitCont_no=document.getElementById("remitContNo").value;
if(rNo!=remitCont_no) {
alert("invalid remit control no");
return;
}
}
function PrintVerify() {
if(xmlHttp.readyState==1) {
//document.getElementById("pa_print").innerHTML="";
//document.getElementById("pa_print").innerHTML="<div align='center'><img src='./images/loader-1.gif'/><br><label >Verifying... </label></div>";
}
if(xmlHttp.readyState==4) {
document.getElementById("pa_print").innerHTML="";
document.getElementById("pa_print").innerHTML=xmlHttp.responseText;
frames['frame1'].print();
}//end of else
}
server page: p_Print.php:
<iframe src="pa_print.php?cono=<?=$contno ?>" name='frame1'></frame>
can somebody help me with this , i am not able to get the contents of the iframe to be printed