DOM Exception 8 layout-tabbar-layout

dhtmlxcontainer.js:55
NOT_FOUND_ERR: DOM Exception 8: An attempt was made to reference a Node in a context where it does not exist.

<div id="profile<?echo $_GET['id']?>" style="width:100%; height:100%; overflow: auto;">
<div id="currentstud<?echo $_GET['id']?>" style="width:100%; height:100%;"></div>
</div>

<script type="text/javascript" charset="utf-8">

var ProfileL = dhxTabbar.cells(dhxTabbar.getActiveTab()).attachLayout("2E");
ProfileL.cells("a").setText("General");
ProfileL.setCollapsedText("a", "General");
ProfileL.cells("b").hideHeader();
ProfileL.cells("a").attachObject("profile<?echo $_GET['id']?>");	
ProfileLT = ProfileL.cells("b").attachTabbar();
	ProfileLT.setImagePath("source/CSS/imgs/");
	ProfileLT.setSkin('dhx_skyblue');
	ProfileLT.addTab("tab1","News","100px");
	ProfileLT.setTabActive("tab1");
	ProfileLT.enableForceHiding(true);
	ProfileLT.setHrefMode("ajax-html");
	ProfileLT.enableTabCloseButton(true);
	ProfileLT.enableAutoReSize(true);
</script>

when attach obj in index.php all work, but in tab it says error ???

Try to call this code from the window.onload event. Moreover, enableAutoReSize should not be used if the tabbar is attached to some other component (its size will be adjusted to parent size automatically).

thanks

have solution with attach

and it work :wink:

have another issue

with attachDataView layout and another tabbar

at web dataview last in script load, but first in script is “undefined”

..... var profiledata = ProfileL.cells("a").attachDataView({ .... var profiledataed = ProfileLT.cells("educp").attachDataView({ ...


Please attach the complete demo where we could recreate the problem.

problem is when attach two or more dataview in layout in my script first i attach
profiledata = ProfileL.cells(“a”).attachDataView({}) and then
educatdata = ProfileL.cells(“b”).attachDataView({})
first got undefined second attached.

Have solution load php or html file into layout and then attached to active layout.