I have three seperate tab panels with each being a table in my database. What i'm trying to do is that on a click of a button is save the content of all the three tabs in the database at the same time. I managed to get the PK "Aid" of the current active tab, however when i try to access the second inactive tab B with window.frames["frm_B"] and alerting the result, i'm getting undefined. Any help would be much appreciated.
tabPanel = Ext.create('Ext.tab.Panel', {
region: 'center',
activeTab: 0,
autoScroll: true,
tbar: [{
xtype: 'button',
text: 'Save',
handler:function(){saveForm("frm_A", save);}
}],
items: [
{
id:"panel_A",
html: "<iframe src= '"+A_url +"' width='100%' height='100%' id='frm_A' name='frm_A' frameborder=0 />",
},{
id:"panel_B",
html: "<iframe src='"+B_url+"' width='100%' height='100%' id='frm_B' name='frm_B' frameborder=0 />",
},{
id:"panel_C",
html: "<iframe src= '"+C_url+"' width='100%' height='100%' id='frm_C' name='frm_C' frameborder=0 />",
}]
});
viewport = new Ext.Viewport({
layout:'border',
items:[tabPanel]
});
function save(record){
var Aid = record.getKey();
var doc = window.frames["frm_B"];
alert(doc);
try {
doc.RECORD.getField("A_ID").setRealValue(Aid);
doc.RECORD.update(closeAndRefresh, viewExtError);
}
catch(e){
showError(e);
}
}