cross browser printing methood


/ Published in: JavaScript
Save to your folder(s)



Copy this code and paste it in your HTML
  1. function showPrintPage() {
  2. var PageType = $("[id$=_lnkPrint]").attr("PageType");
  3. var grdID = 'divGrid';
  4. if (PageType == "Multitab") {
  5. grdID = $("[id$=_lnkPrint]").attr("Gridid");
  6. }
  7. var Browsediv = window.document.getElementById(grdID);
  8. var Detaildiv = window.document.getElementById('idAreaDetail');
  9. var Chartdiv = window.document.getElementById('idAreaChart');
  10. if (Browsediv != null)
  11. getPrint(grdID);
  12. else if (Detaildiv != null)
  13. getPrint('idAreaDetail');
  14. else if (Chartdiv != null)
  15. getPrint('idAreaChart');
  16.  
  17. return false;
  18. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.