How to load a scheduler in a tabbar?

Hello: i’m trying to load a Scheduler in a tabbar, and in the other tabs load other content but i can’t make it.

Someone can help me :blush:

Are you using dhtmlxTabbar ?
You can

a) use iframe mode - any content can be loaded in such mode
b) use tabbar.cells(tabid).attachScheduler(); API

mmmm i think that the iframe is only in dhtmlx touch, i’m using dhtmlx web. so how i can do in the dhtmlx to do that???

sorry i cannot read the option B jeje :laughing:

As for iframes In dhtmlx suite, you can use

tabbar.cells(id).attachUrl("some.html", false)

which loads some.html page in iframe

Did you get this to work tinchossh? I’ve almost got it working, but still have a few issues - including dataprocessor. My scheduler is working great outside of the tabbar, but not inside. I’ve added my main code below if anyone can give me suggestions. Thanks.

AQM-1
<script src="js/dhtmlxcommon.js"></script>
<script src="js/dhtmlxlayout.js"></script>
<script src="js/dhtmlxtabbar.js"></script>
<script src="js/dhtmlxcontainer.js"></script>
<script src="js/dhtmlxscheduler.js"></script>
<script src="js/dhtmlxscheduler_recurring.js"></script>

<link rel="stylesheet" type="text/css" href="css/dhtmlxlayout.css">
<link rel="stylesheet" type="text/css" href="css/dhtmlxtabbar.css">
<link rel="stylesheet" type="text/css" href="skins/dhtmlxlayout_dhx_skyblue.css">
<link rel="stylesheet" type="text/css" href="css/dhtmlxscheduler.css" type="text/css" title="no title" charset="utf-8">

<style type="text/css" media="screen">
    html, body {
        width: 100%;
        height: 100%;
        margin: 0px;
        overflow: hidden;
    }
</style> 
var dhxLayout = new dhtmlXLayoutObject(document.body, "3L"); dhxLayout.cells("b").setText("Main Content"); dhxLayout.cells("a").setText("Site Navigation"); dhxLayout.cells("c").setText("Detail"); dhxLayout.cells("a").setWidth(200); dhxLayout.cells("c").setHeight(100); //***add tab bar to cell b*** dhxTabbar = dhxLayout.cells("b").attachTabbar(); dhxTabbar.setSkin('dhx_skyblue'); dhxTabbar.setImagePath("imgs/"); dhxTabbar.addTab("a1", "Events", "100px"); dhxTabbar.addTab("a2", "Tab 1-2", "100px"); dhxTabbar.addTab("a3", "Tab 1-3", "100px"); dhxTabbar.setTabActive("a1"); //***add scheduler to tab a1*** var schedHtml = '
'+ '
'+ '
 
'+ '
 
'+ '
'+ '
'+ '
'+ '
'+ '
'+ '
'+ '
'+ '
'+ '
'+ '
'+ '
';
    dhxTabbar.setContentHTML("a1", schedHtml);
    
    var dhxSched = dhxTabbar.cells("a1").attachScheduler(null,"month","scheduler_here");  
    dhxSched.config.xml_date="%Y-%m-%d %H:%i";
	dhxSched.config.details_on_create=true;
	dhxSched.config.details_on_dblclick=true;
	dhxSched.load("recurring_events_connector.php?uid="+scheduler.uid());

	var dp = new dataProcessor("recurring_events_connector.php");
	dp.init(dhxSched);
</script>

a) you need not use setContentHTML before attachScheduler, just user attachScheduler
b) you must always use “scheduler” as name of scheduler object, not dhxSched ( as standard version of scheduler supports only one scheduler per page and it uses global “scheduler” var )

scheduler.config.xml_date="%Y-%m-%d %H:%i"; scheduler.config.details_on_create=true; scheduler.config.details_on_dblclick=true; dhxTabbar.cells("a1").attachScheduler(null,"month"); scheduler.load("recurring_events_connector.php?uid="+scheduler.uid());

Great. Thanks Stanislav.

I had originally done it without trying to add the div tag html to the tab, but wasn’t seeing my prev and next buttons for month. Doing it as you say fixed my dataprocesser problem, but I still don’t see the buttons to change the month. I’m sure it’s because I don’t have the images in the right place. Can you tell me where they should be? Are they referenced in the CSS? I couldn’t tell from the sample app.

they loaded in reference to css file like imgs/some.gif, so in same place where you have dhtmlxscheduler.css you need have imgs folder from the original codebase

Hey tKworkman , sorry for the late answer.

About you asking me , not i’m not did able to make it work, i’m very newbie and i tried to make a CRM but the business just dropped.

Sorry for my english, i’m a native spanish speaker