Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted on Jan 07, 2009 03:17
open dhtmlx forum
Dhtmlxtabbar - all tab contents are showing while previewing the page or printing

Sir,
I had implemented dhtmlxtabbar in my application using jsp, java.
while taking print or preview all the tab contents are getting overlapped. i had 3 tabbars. while taking first tabbar no problem. while selecting second and third tabbar and if we select print preview first tab bar content also displaying -overlapping . please suggest a solution. i am attaching the coding which i had given:

function tabbar_onload()
{
   tabbar=new dhtmlXTabBar("sample","top");
   tabbar.setImagePath("<%=appPath%>/dhtmlxtabbar/codebase/imgs/");
   // tabbar.setSkinColors("#FCFBFC","#F4F4EE");
  tabbar.setSkinColors("#FCFBFC","#FCFBFC");
   tabbar.setStyle("modern");
   tabbar.addTab("0","Mailing/Communications","280px");
   tabbar.addTab("1","Reservations","280px");
   tabbar.addTab("2","Interests","280px");
   <% try{              //added on dec 22                                           
   if(request.getParameter("src").equals("bk"))     
   {%>                                                  
   tabbar.setTabActive("1");                    
   <%}                                                  
   else                                                 
   {%>                                                  
   tabbar.setTabActive("0");                    
   <%}                                                  
   }catch(Exception e){%>                                       
   tabbar.setTabActive("0");                            
    <%}%> 

   tabbar.setContent("0","paltest");
   tabbar.setContent("1","reservations");
   tabbar.setContent("2","interests");  tabbar.setOnSelectHandler(pal3);
 
}
function pal3(idn,ido)
{
 var tabvalue = parseInt(idn);
switch(tabvalue){case 0:src="cm";
displayhistory(src);
break;
case 1:src="bk";
displayhistory(src);
break;
case 2:
src="intr";
displayhistory(src);break;}return true;
 
}
function displayhistory(ths){ 
  if(ths=="cm"){
   if(document.forms[0].stat.value=="yes") {
  if (!confirm("Do you want save the details")) {
  window.location.href="<%=commhistoryurl%>";
  }
  else {
   validate();
  }
 }
 else{ 
  var elm11 = document.getElementById("paltest");
   elm11.style.visibility = "visible";
   var elm22 = document.getElementById("reservations");
   elm22.style.visibility = "hidden";
   var elm33 = document.getElementById("interests");
   elm33.style.visibility = "hidden";
}for all the tabvalues

 

Please suggest a solution

 

Answer posted by Support on Jan 07, 2009 16:16
In which browser issue occurs for you ?
As fast solution you can try to add the next command to the tabbar's init code
  tabbar=new dhtmlXTabBar("sample","top");
  tabbar.enableForceHiding(true);