dhtmlxTabbar - reloading Iframe

Hi,





I have a LAYOUT, inside layout i added Tabbar. Inside tabbar in one tab i am calling external URL inside iframe.



Issue is i want to reload external URL 3 or 4 times onSelect of tab ‘Add Items’’. My item dosen’t get added into basket because all items list goes together till the external page get loaded.



IS THERE ANY WAY TO CHECK EXTERNAL URL PAGE IS LOADED COMPLETELY, THEN SEND second request.



here is my code:



var workspaceLayout = new dhtmlXLayoutObject(document.body, “2E”);

var medCell = workspaceLayout.cells(“a”)

var addItemCell = workspaceLayout.cells(“b”)

medCell.hideHeader();

addItemCell .hideHeader();

var medGrid = medCell.attachGrid();

medCell.setHeight(127);

var dhxTabbar =workspaceLayout.cells(“b”).attachTabbar();

dhxTabbar.setImagePath("/javascripts/dhtmlx/dhtmlxTabbar/codebase/imgs/");

dhxTabbar.setHrefMode(“iframes”);

dhxTabbar.addTab(“a1”,“List”,“100px”);

dhxTabbar.addTab(“a2”,“Add Items”,“100px”);



dhxTabbar.setContentHref(‘a2’,‘http://www.xyz.com/addItems?reset=t’);

dhxTabbar.setOnSelectHandler(function(id){

window.setTimeout(function(){

var frame=dhxTabbar._content[id].childNodes[0];

var itemArray = [‘item1’,‘item2’’,‘item3’]



for(i=0; i<=3;i++)

{

frame.src = 'http://www.xyz.com/add?addItem=’+itemArray [i];



dhxTabbar.forceLoad(‘a2’,frame.src);

}





},1);



return true;

});






If you want to execute some functionality when page is loaded, the best solution is to set body onload event handler at this page - page which is loaded inside iframe: