este es la linea de codigo que uso parar mandar llamar mis recursos:
menuTabs1 = new tabPrincipal (0, "div01", 2);menuTabs1.agregaTab("tab01_1","accordion/index.html", loadAccordions,); <-aqui quiero mandar llamar dos funciones y no me deja, solo puedo agregar "loadacordions" y quisiera agregar otra

menuTabs1.agregaTab("tab01_2","etapas/indexEtapa.html", iniciaEtapa);
menuTabs1.agregaTab("tab01_3","tabPrincipal/mapa.html", null);
menuTabs1.crear();
este es el codigo de lo tabs, donde quiero yo lograr que la peticion acepte dos o mas funciones:
function tabPrincipal (id, destino, activa)
{
this.menuSel = null;
this.id = id;
this.destino = destino;
this.activa = activa;
this.tabs = new Array();
};
tabPrincipal.prototype.crear = function ()
{
for (var t = 0; t<= this.tabs.length-1; t++)
{
var tabTemp = document.getElementById(this.tabs[t].id);
tabTemp._parent = this;
tabTemp._recurso = this.tabs[t].recurso;
tabTemp._funcion = this.tabs[t]._funcion;
tabTemp.onclick = function ()
{
this._parent.peticionMenu(this, this._recurso, this._funcion);
return false;
}
}
if (this.activa >= 0)
{
this.peticionMenu(document.getElementById(this.tab s[this.activa].id),this.tabs[this.activa].recurso);
}
};
tabPrincipal.prototype.agregaTab = function (id,recurso, funcion)
{
var tabTemp= new Object();
tabTemp.id = id;
tabTemp.recurso = recurso;
tabTemp._funcion = funcion;
this.tabs.push(tabTemp);
}
tabPrincipal.prototype.peticionMenu = function (celda, recurso, funcion)
{
oThis = this;
if (celda != false)
{
this.menuOut(celda);
}
this.despliegaInfo("</br><img src='images/cargando.gif' width='20' height='20' />Cargando información</br>");
var oXMLHttp = zXmlHttp.createRequest();
oXMLHttp.open("get", recurso, true);
oXMLHttp.onreadystatechange = function ()
{
if (oXMLHttp.readyState == 4)
{
if (oXMLHttp.status == 200)
{
oThis.despliegaInfo(oXMLHttp.responseText, funcion);
}else
{
oThis.despliegaInfo("Ocurre un error de comunicación: "+ oXMLHttp.statusText)
}
}
}
// document.documentElement.scrollTop = 100;
oXMLHttp.send(null);
}
tabPrincipal.prototype.menuPress = function (celda)
{
celda.className = "tabNoActivo";
}
tabPrincipal.prototype.menuOut = function (celda)
{
if (this.menuSel != null)
this.menuPress (this.menuSel);
celda.className = "tabActivo";
this.menuSel = celda;
}
tabPrincipal.prototype.despliegaInfo = function (contenido, funcion)
{
var divR = document.getElementById(this.destino);
divR.innerHTML = contenido;
if (funcion != null || funcion != undefined)
{
funcion();
}
}
/************************************************** **********/
me gustaria sbaer si pueden orientarme y decirme que agregar este codigo para que mi peticion reciba mas de una funcion.
muchas gracias.
42
