Friday, 19 April 2013

Remove scroll then print all data using javascript



function getForm()
    {
   
        var prtContent = document.getElementById('divPrintSupplierBill');
       var WinPrint = window.open('','','letf=100,top=100,width=1000px,height=640px,toolbar=1,scrollbars=1,status=1');
       WinPrint.document.write(prtContent.outerHTML);
       WinPrint.document.close();
       WinPrint.focus();
       WinPrint.print();
     //WinPrint.close();
       //prtContent.innerHTML=strOldOne;
    }
   
    function disableBtn() {
    document.getElementById("btnPrintInvoice").disabled=true
}





function ff()
    {
   var tt= document.getElementById("ctl00_ContentPlaceHolder1_pnlSupplierBilDetail");
    tt.style.cssText='overflow-y:hidden';
    getForm();
    scrollallow();
    return false;
    }
function scrollallow()
{
var tt= document.getElementById("ctl00_ContentPlaceHolder1_pnlSupplierBilDetail");
   tt.style.cssText='overflow-y:scroll;Height:350px';
    return false;
}

No comments:

Post a Comment

How to highlight selected text in notepad++

  –> To highlight a block of code in Notepad++, please do the following steps step-1  :- Select the required text. step-2  :- Right click...