PDA

View Full Version : value from div can't be load in new tab panel



y0uzha
4 Nov 2014, 1:55 AM
why i can't copy my div element inside this post.? i have try with tag
but it doesn't appear. hi, i try to use extjs and gojs.i want to make some new tab by clicked node from tree panel.and i found some problem when i've click that node. the new tab can show but value from the first tab cant be copied.anybody can help me to solve this problem.?this is my code:
var nodeText = record.get('text');var tabId = record.get('id'); var tabPanel = Ext.ComponentQuery.query('viewport tabpanel')[0]; var tab = tabPanel.child('#' + tabId); if (tab == null) { tab = Ext.create('Ext.panel.Panel', { itemId: tabId, html: Ext.getDom('centers1').innerHTML, closable:true, title: nodeText }); tabPanel.add(tab); } tabPanel.setActiveTab(tab);and this is my html element: [html] the function that i've put inside myDiagram can't be showed in the new tab. i try check with inspect element it nothing error report. please help me.

slemmon
5 Nov 2014, 2:09 PM
You might try with Ext.clone
http://docs.sencha.com/extjs/4.2.3/#!/api/Ext-method-clone

html: Ext.clone(Ext.getDom('centers1'))

y0uzha
5 Nov 2014, 6:05 PM
hi, thx for your reply. i've try it. use Ext.clone(Ext.getDom('centers1'))
but it still empty inside the new tab. the function seems not works.