1. Juni 2010 14:08
1. Juni 2010 15:53
var objWindow = document.frames['IFRAME_Activity'];
//hide the Filter bar
if (objWindow.document.all.AppGridFilterSelector!=null) {
objWindow.document.all.AppGridFilterSelector.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.children[0].style.display='none';
}
//hide the menu bar
if (objWindow.document.all.mnuBar1 !=null) {
objWindow.document.all.mnuBar1.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.style.display='none';
}
code - the content of iframe is not ready. Try to change code on following:
if (crmForm.FormType == 1)
{
document.all.IFRAME_Activity.src="about:blank";
}
else
{
var navActivity;
navActivity = document.all.navActivities;
if (navActivity!= null)
{
document.all.IFRAME_Activity.src="/sfa/conts/areas.aspx?oId=" + crmForm.ObjectId + "&oType=2&security=852023&tabSet=areaActivities";
var objFrame = document.getElementById('IFRAME_Activity');
var objWindow = document.frames['IFRAME_Activity'];
objFrame.onreadystatechange = function()
{
if (objWindow.document.readyState=='complete')
{
if (objWindow.document.all.AppGridFilterSelector!=null)
{
objWindow.document.all.AppGridFilterSelector.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.children[0].style.display='none';
}
if (objWindow.document.all.mnuBar1 !=null)
{
objWindow.document.all.mnuBar1.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.style.display='none';
}
}
}
}
}