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?



Reply With Quote


Bookmarks