HI,

I toggled between two tabs or lets say two DIVs using a toggle that consists of two hyperlinks. On click of each Hyper link , I've displayed the corresponding DIV by increasing its Z-index and the visibility is set to Visible. This way i preserve the state of the pages instead of rendering the whole page again through Ajax.

In one of the Div, for the first time its rendered, we set some XSLT string to its innerHTML. So after the first time, every time we are trying to display the DIV by increasing its Z-index. I wonder why the innerHTML that was previously set was getting reset to blank everytime we do this.

Please find the code below.

if(changeSponsorFlag == 'true')
{
alert('inside the rendering process');
alert('object - ' + object);
object.innerHTML = "";
//ajax stuff
var args = "dispatch=getUserLibraryTree&userCode="+userCode+"&sponsorCode="+sponsorCode;
callBack(url,'POST',null,args);
var response = processResponse();
object.style.zIndex = max;
document.getElementById('FCBlockDiv').style.zIndex = max;
document.getElementById('privateEquityDiv').style.zIndex = -1;
document.getElementById('FCBlockDiv').style.visibility='visible';
document.getElementById('privateEquityDiv').style.visibility='hidden';

document.getElementById('headerSectionTable').rows[2].cells[0].style.visibility='visible';
document.getElementById('searchId').innerHTML = 'Search';
if(response.search(/unavailable/i) != -1) {
document.location.href = "jsp/error.jsp?closeWinRequired=false";
} else {
object.innerHTML = response;
}
alert(object.innerHTML);
}
else
{
var object = (document.getElementById('FCBlockDiv')==null)?parent.document.getElementById('FCBlockDiv'):document. getElementById('FCBlockDiv');
alert('inside the without rendering process');
alert('object - ' + object);
alert(object.innerHTML);
object.style.zIndex = max;
document.getElementById('FCBlockDiv').style.zIndex = max;
document.getElementById('privateEquityDiv').style.zIndex = -1;
document.getElementById('FCBlockDiv').style.visibility='visible';
document.getElementById('privateEquityDiv').style.visibility='hidden';

document.getElementById('headerSectionTable').rows[2].cells[0].style.visibility='visible';
document.getElementById('searchId').innerHTML = 'Search';
}


Please help me out on this and suggest any solutions for this scenario.

Thanks,
Kartheek.