locked
Hide mnuBar1 RRS feed

  • 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.

    Friday, May 15, 2009 2:38 PM

All replies

  • If you look at his code:

    1. //the first part is to hide the borders   
    2. var frameName = 'IFRAME_Activities';   
    3. var objFrame = document.getElementById(frameName);   
    4. 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 Milam
    Tuesday, 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, Aarch
    Wednesday, 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.

    Friday, May 15, 2009 2:38 PM