Answered by:
Hide mnuBar1

Question
-
I've made an asp file based on a advanced find view to show tasks regarding a oportunity. This is shown in an iframe on the form. This is the code i've used to show it:
if (crmForm.ObjectId != null) crmForm.all.IFRAME_tasklist.src = '/UserDefined/tasklist.asp?id=' + crmForm.ObjectId;
My goal now is to hide the top menu bar in the view ( id = mnuBar1 ).
Found a great post about this here: http://crm.atechnisch.nl/2008/03/hiding-bars-in-iframes/
But that code only helps you if you use standard views and set the URL in the iframe properties (at least thats what i think). When i try to add the code in my onload script, i'm not able to find the document where i wan't to remove the menubar.
Any ideas on a code snippet that could get me in resultFrame shown in the iframe, and help me remove the mnuBar1 ?Wednesday, April 22, 2009 4:35 PM
Answers
-
I had the same problem...
It was because the advanced find view was not loading yet when I tried to hide the mnuBar1.
To go through, I've put this "hidding code" on the "onclick" event of the tab containing my IFRAME, on the onlaod event of my form:
crmForm.all.tab2Tab.onclick =
function()
{
if (crmForm.document.all.IFRAME_Members.contentWindow.frames[1].document.all.mnuBar1)
{
crmForm.document.all.IFRAME_Members.contentWindow.frames[1].document.all.mnuBar1.style.display=
'none';
}
}
Hope it will help you.
regards.- Proposed as answer by jim66 Friday, May 15, 2009 2:40 PM
- Marked as answer by DavidJennawayMVP, Moderator Tuesday, June 2, 2009 9:30 PM
Friday, May 15, 2009 2:38 PM
All replies
-
If you look at his code:
- //the first part is to hide the borders
- var frameName = 'IFRAME_Activities';
- var objFrame = document.getElementById(frameName);
-
var objWindow = document.frames[frameName];
I think all you have to do is 'IFRAME_tasklist' as the frameName.
Let me know if that works, Mitch
Mitch MilamTuesday, May 5, 2009 6:18 PM -
Hi ,
am also having the same problem. i tried the code in http://crm.atechnisch.nl/2008/03/hiding-bars-in-iframes/
post.
but i am not able to see the difference,,i still can see the filters and menu .....
my iframe is in another tab..will it be the reason ??
i found that it is not going to the step
if (objWindow.document.all.AppGridFilterSelector!=null) {}
can anyone help solve this
Thanks, AarchWednesday, May 6, 2009 6:51 AM -
I had the same problem...
It was because the advanced find view was not loading yet when I tried to hide the mnuBar1.
To go through, I've put this "hidding code" on the "onclick" event of the tab containing my IFRAME, on the onlaod event of my form:
crmForm.all.tab2Tab.onclick =
function()
{
if (crmForm.document.all.IFRAME_Members.contentWindow.frames[1].document.all.mnuBar1)
{
crmForm.document.all.IFRAME_Members.contentWindow.frames[1].document.all.mnuBar1.style.display=
'none';
}
}
Hope it will help you.
regards.- Proposed as answer by jim66 Friday, May 15, 2009 2:40 PM
- Marked as answer by DavidJennawayMVP, Moderator Tuesday, June 2, 2009 9:30 PM
Friday, May 15, 2009 2:38 PM