Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: HV Menu does not appear in frame. Appears without Frame

  1. #1
    Join Date
    Nov 2007
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default HV Menu does not appear in frame. Appears without Frame

    Using HVMenu 5.5. Looked great as standalone page. Small problem. When I loaded that page into a frame, the menu did not appear. If I refreshed the page, the menu would then appear. Found a solution for that right here, replacing this code

    if(Trigger.onload)
    {
    Dummy=Trigger.onload;
    }
    Trigger.onload=Go;

    with this code

    if ( typeof window.addEventListener != "undefined" )
    window.addEventListener( "load", Go, false );
    else if ( typeof window.attachEvent != "undefined" )
    window.attachEvent( "onload", Go );
    else {
    if ( window.onload != null ) {
    var oldOnload = window.onload;
    window.onload = function ( e ) {
    oldOnload( e );
    Go();
    };
    }
    else
    window.onload = Go;
    }.


    All was well.

    Then the menu stopped appearing in the frame altogether. Still appears when the page is loaded directly into the browser. I tracked the problem using alerts. The script is dying on this line in IE.

    var Doc=Par.document;

    And on this line in FireFox

    var Bod=Doc.body;

    I removed the previous modification, but the problem remains.

    Here's the script up to that point.

    var AgntUsr=navigator.userAgent.toLowerCase();
    var AppVer=navigator.appVersion.toLowerCase();
    var DomYes=document.getElementById?1:0;

    var NavYes=AgntUsr.indexOf('mozilla')!=-1&&AgntUsr.indexOf('compatible')==-1?1:0;
    var ExpYes=AgntUsr.indexOf('msie')!=-1?1:0;
    var Opr=AgntUsr.indexOf('opera')!=-1?1:0;
    var Opr6orless=window.opera && navigator.userAgent.search(/opera.[1-6]/i)!=-1 //DynamicDrive.com added code
    if(Opr){NavYes=1;ExpYes=0;}
    var DomNav=DomYes&&NavYes?1:0;
    var DomExp=DomYes&&ExpYes?1:0;
    var Nav4=NavYes&&!DomYes&&document.layers?1:0;
    var Exp4=ExpYes&&!DomYes&&document.all?1:0;
    var Exp6Plus=(AppVer.indexOf("msie 6")!= -1||AppVer.indexOf("msie 7")!= -1)?1:0
    var PosStrt=(NavYes||ExpYes||Opr)&&!Opr6orless?1:0;
    var P_X=DomYes?"px":"",FHtml=null,ScHtml=null,FCmplnt=0,SCmplnt=0;
    var FrstLoc,ScLoc,DcLoc;
    var ScWinWdth,ScWinHght,FrstWinWdth,FrstWinHght;
    var ScLdAgainWin;
    var FirstColPos,SecColPos,DocColPos;
    var RcrsLvl=0;
    var FrstCreat=1,Loadd=0,Creatd=0,IniFlg,AcrssFrms=1;
    var FrstCntnr=null,CurrntOvr=null,CloseTmr=null;
    var CntrTxt,TxtClose,ImgStr;
    var Ztop=100;
    var ShwFlg=0;
    var M_StrtTp=StartTop,M_StrtLft=StartLeft;
    var StaticPos=0;
    var M_Hide=Nav4?'hide':'hidden';
    var M_Show=Nav4?'show':'visible';

    var Par=parent.frames[0]&&FirstLineFrame!=SecLineFrame?parent:window;

    var Doc=Par.document;
    var Bod=Doc.body;
    var Trigger=NavYes&&!Opr?Par:Bod;

    I re-iterate, it ran fine, even with frames, for 24 hours, then it conked out, and it won't run in the frame at all.

    Any ideas?

  2. #2
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,881
    Thanks
    49
    Thanked 266 Times in 258 Posts
    Blog Entries
    56

    Default

    You can use the non-frameset HV menu (the one that's not specially designed for framesets) for framesets!
    Look at the technique explained here for the way to do it. When you follow the instructions, the problem you talk about will not present itself anymore.

    Arie Molendijk.

  3. #3
    Join Date
    Nov 2007
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    molendijk - I tried your techique and it certainly eliminates the problem! I am running into another one however. The correct page loads on the first menu click. But on subsequent clicks, nothing happens! I have the target url appearing in the status on Mouseover, and it seems to be correct, but when I click .... nada.

    I believe I followed your directions closely. I did use <base target="content"> (content being the name of the target frame.) The menus are certainly appearing.

    One peculiarity, the menu seems to be painted twice when it first loads! That is to say, it seems to be painted again over the first time, about 30 pixels to the right. After the first mouse click, the second menu vanishing, and there's only one, which only works for links NOT going into the target frame.

    That is to say, the following works....

    javascript: top.location.href ='http://intrapar1/..../index.htm'

    While this doesn't ...

    javascript: parent.content.location.href ='http://intrapar1/..../index.htm'

    Both work properly if they are the first click.

  4. #4
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,881
    Thanks
    49
    Thanked 266 Times in 258 Posts
    Blog Entries
    56

    Default

    Are you sure you've eliminated everything that 's related to the frameset use of the HV Menu? For instance, do you have this now?:
    var DocTargetFrame="";
    var MenuUsesFrames=0;

    Perhaps you could give me a link to your site?

    Arie M.

    (I made a demo, see next post)
    Last edited by molendijk; 11-09-2007 at 01:07 PM. Reason: Correction

  5. #5
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,881
    Thanks
    49
    Thanked 266 Times in 258 Posts
    Blog Entries
    56

    Default

    I made a quick demo for you, based on an old HV menu that features in DynamicDrive. It's located here.
    I had to make some weird provisional changements in exmplmenu_var.js (that's the menu here) in order to force the pages to open in the main page's frame (name: 'main' here). Also, you have to click on the TEXT in the subitems in order to open the pages. That should be corrected. Examine for yourself. But you can see that it works, in a (provisional) way (even with foreign pages). There a link for download. Good luck.

    Arie Molendijk.
    Last edited by molendijk; 11-09-2007 at 01:06 PM. Reason: Corrections

  6. #6
    Join Date
    Nov 2007
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by molendijk View Post
    Are you sure you've eliminated everything that 's related to the frameset use of the HV Menu? For instance, do you have this now?:
    var DocTargetFrame="";
    var MenuUsesFrames=0;

    Perhaps you could give me a link to your site?

    Arie M.

    (I made a demo, see next post)
    The site in question, regrettably, is an intranet. It's not accessible from outside. I'll double check on the 'frameset use of the HV Menu' code.

    BTW, thank you for being so helpful.

  7. #7
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,881
    Thanks
    49
    Thanked 266 Times in 258 Posts
    Blog Entries
    56

    Default

    No problem.
    Anyway, the demo (see previous post) I posted seems to work now, see here.

    Good luck,
    Arie M.

  8. #8
    Join Date
    Nov 2007
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by molendijk View Post
    I made a quick demo for you, based on an old HV menu that features in DynamicDrive. It's located here.
    I had to make some weird provisional changements in exmplmenu_var.js (that's the menu here) in order to force the pages to open in the main page's frame (name: 'main' here). Also, you have to click on the TEXT in the subitems in order to open the pages. That should be corrected. Examine for yourself. But you can see that it works, in a (provisional) way (even with foreign pages). There a link for download. Good luck.

    Arie Molendijk.
    Hmmmm .... what do you mean by 'weird provisional changements'. The exact problem I'm having is getting pages to open in the main pages frame.

  9. #9
    Join Date
    Nov 2007
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    One other thing. You mentioned removing the code related to frames. There's actually quite a bit of that. Did you actually mean 'all', or am I looking for something specific?

    Most of the code I tried removing resulted in the menu not displaying at all.

  10. #10
    Join Date
    Nov 2007
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I'm studying your example now. Good stuff.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •