Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by jim on Sep 26, 2007 10:03
open dhtmlx forum
How to print or printpreview dhtmlXTabBar

in the dhtmlXTabBar, How to print or printpreview the content of a Tab ?
Answer posted on Sep 26, 2007 12:13
If you are using non-iframes mode it can be printed only with top page.
In iframe based mode you can try
    tabbar.tabWindow(tab_id).print();
Answer posted on Oct 16, 2007 20:55

Thanks for the help, but Cannot Print or Preview  the contents of a Tab,please test the code below

              var Htmlpage=tabbar.tabWindow(tabbar.getActiveTab());

              var pObject="<OBJECT ID=\"Oprint\" WIDTH=0 HEIGHT=0 CLASSID=\"CLSID:8856F961-340A-11D0-A96B-00C04FD705A2\" ></OBJECT>";
               var printerCTL=Htmlpage.document.getElementById("Oprint");
               try {
              if ( ! printerCTL)
              {Htmlpage.document.body.insertAdjacentHTML("afterBegin",pObject); }
              Htmlpage.focus();
              Htmlpage.document.Oprint.ExecWB(7,1);