PDA

View Full Version : Form not loading in Tab Panel



saravanan.sbm
10 Apr 2009, 2:00 AM
Hi

I have created a tab using link. It is creating tabs but not loading the html content inside the tab panel.please any one help me.

My code:


<a id="link0" href="#" link="sample0.html">Add </a> (html link to create tab)


tab creation code:

function addTab(tabId, tabTitle, targetUrl) {
tabPanel.add({
title: tabTitle,

id: tabId,
autoLoad: {url: 'targetUrl', scope: this, text: "loading ..."},



closable:true
}).show();
}

// Update the contents of a tab if it exists, otherwise create a new one
function updateTab(tabId, title, url) {
var tab = tabPanel.getItem(tabId);
if (tab) {
tab.getUpdater().update(url);
tab.setTitle(title);
} else {
tab = addTab(tabId, title, url);
}
tabPanel.setActiveTab(tab);
}

function doAction(e, t){
e.stopEvent();
updateTab(t.id, t.text, t.attributes['link'].nodeValue);
}

tryanDLS
10 Apr 2009, 6:56 AM
Please post in the correct forum and read http://extjs.com/learn/Ext_Forum_Help#How_to_post_code_properly