Hi all,
I DLd SlideMenu2 from DHTMLCentral and am trying to do some (what I thought were easy) mods. Ihave ran into a problem and have asked for help there, but never get a response.
This works fine in IE 5.5 and NN7. However, in NN4 I get the error "document.divSlideCont.document.layers.divSlide1 has no properties".
If I remove the line <DIV id="divSlide0" CLASS="MenuTop"> then I don't get the error, but is also doesn't display properly in any browser. Can anyone spot the problem?
Everything looks right to me, so any help would be greatly appreciated.
Jim
The script that writes all of this out is:
And the output in NN4 when you view source for the page is:
And finally, the CSS that backs all of this up is:
I DLd SlideMenu2 from DHTMLCentral and am trying to do some (what I thought were easy) mods. Ihave ran into a problem and have asked for help there, but never get a response.
This works fine in IE 5.5 and NN7. However, in NN4 I get the error "document.divSlideCont.document.layers.divSlide1 has no properties".
If I remove the line <DIV id="divSlide0" CLASS="MenuTop"> then I don't get the error, but is also doesn't display properly in any browser. Can anyone spot the problem?
Everything looks right to me, so any help would be greatly appreciated.
Jim
The script that writes all of this out is:
Code:
menus=new Array(); var a=0; var b=0; var c=0; var d=0
function makeMenu(type,text,lnk,target,end){
str=""; tg="";
if(target) tg='target="'+target+'"'
if(!lnk) lnk="#"
//self.status=lnk
if(a==0) str='<div id="divSlideCont">\n';
if(type=="top"){
menus[a]=new Array();
if(text=="seperator"){
str+='\t<div id="divSlide'+a+'" class="clSlideLogo"><DIV id="divSlide'+a+'" CLASS="LogoTop"><img src="images/rcdsmall2.png"></DIV>\n</div>\n<DIV id="divSlide'+a+'" CLASS="MenuTop">\n'
menus[a].seperator=1
}else{
//MOD03: replace onclick with onmouseover in the next line to make the menu unfold onmouseover
str+='\t<div id="divSlide'+a+'" class="clSlide"><a href="'+lnk+'" '+tg+' onclick="swmenu('+a+',-1,-1); if(bw.ie || bw.ns6) this.blur(); '
if(lnk=="#") str+='return false'
str+='" class="clSlideLinks"> '+text+'</a><br></div>\n'
}
menus[a].subs=0; a++; b=0
}else if(type=="sub"){
//MOD01: routine to mark sub if link matches current page
var cls='clSlideSubLinks';
if(lnk==url || lnk==page){
arr[arr.length]=a-1;
cls='clSlideSubHilite';
menus[0].hi=b;
}
//MOD03: replace onclick with onmouseover in the next line to make the menu unfold onmouseover
str+='\t\t<div id="divSlideSub'+(a-1)+'_'+b+'" class="clSlideSub"><a '+tg+' onclick="swmenu('+(a-1)+','+b+',-1); if(bw.ie || bw.ns6) this.blur(); '
if(lnk=="#") str+='return false'
str+='" href="'+lnk+'" class="'+cls+'"> '+text+'</a><br></div>\n'
b++; menus[a-1].subs=b; menus[a-1][b-1]=new Array(); c=0; menus[a-1][b-1].subs=0
}else if(type=="sub2"){
//MOD01: routine to mark sub2 if link matches current page
var cls='clSlideSub2Links';
if(lnk==url || lnk==page){
arr[arr.length]=a-1;
arr[arr.length]=b-1;
cls='clSlideSub2Hilite';
menus[0].hi=c;
}
str+='\t\t<div id="divSlideSub'+(a-1)+'_'+(b-1)+'_'+c+'" class="clSlideSub2"><a '+tg+' href="'+lnk+'" class="'+cls+'"> '+text+'</a><br></div>\n'
c++; menus[a-1][b-1].subs=c; menus[a-1][b-1][c-1]=new Array(); d=0; menus[a-1][b-1][c-1].subs=0
}
if(type=="end") str+="</div>\n</div>\n"
document.write(str)
}
And the output in NN4 when you view source for the page is:
Code:
<DIV id="divSlideCont">
<DIV id="divSlide0" class="clSlideLogo"><DIV id="divSlide0" CLASS="LogoTop"><IMG src="images/rcdsmall2.png"></DIV>
</DIV>
<DIV id="divSlide0" CLASS="MenuTop">
<DIV id="divSlide1" class="clSlide"><A href="index.html" onclick="swmenu(1,-1,-1); if(bw.ie || bw.ns6) this.blur(); " class="clSlideLinks"> Home</A><BR></DIV>
<DIV id="divSlide2" class="clSlide"><A href="#" onclick="swmenu(2,-1,-1); if(bw.ie || bw.ns6) this.blur(); return false" class="clSlideLinks"> Portfolio</A><BR></DIV>
<DIV id="divSlideSub2_0" class="clSlideSub"><A onclick="swmenu(2,0,-1); if(bw.ie || bw.ns6) this.blur(); " href="webportfolio.html" class="clSlideSubLinks"> Web Portfolio</A><BR></DIV>
<DIV id="divSlideSub2_1" class="clSlideSub"><A onclick="swmenu(2,1,-1); if(bw.ie || bw.ns6) this.blur(); " href="printportfolio.html" class="clSlideSubLinks"> Print Portfolio</A><BR></DIV>
<DIV id="divSlide3" class="clSlide"><A href="aboutus.html" onclick="swmenu(3,-1,-1); if(bw.ie || bw.ns6) this.blur(); " class="clSlideLinks"> About Us</A><BR></DIV>
</DIV>
</DIV>
And finally, the CSS that backs all of this up is:
Code:
#divSlideCont {
HEIGHT: 350px;
LEFT: 0px;
POSITION: absolute;
TOP: 100px;
VISIBILITY: hidden;
WIDTH: 150px;
Z-INDEX: 10
}
DIV.clSlide {
CLIP: rect(0px 138px 22px 0px);
HEIGHT: 22px;
LEFT: 0px;
PADDING-BOTTOM: 3px;
PADDING-LEFT: 3px;
PADDING-RIGHT: 3px;
PADDING-TOP: 3px;
POSITION: absolute;
WIDTH: 138px;
Z-INDEX: 10
}
DIV.clSlideLogo {
CLIP: rect(0px 138px 150px 0px);
HEIGHT: 22px;
LEFT: 0px;
PADDING-BOTTOM: 3px;
PADDING-LEFT: 3px;
PADDING-RIGHT: 3px;
PADDING-TOP: 3px;
POSITION: absolute;
WIDTH: 138px;
Z-INDEX: 10
}
DIV.clSlideSub {
CLIP: rect(0px 127px 20px 0px);
HEIGHT: 20px;
LEFT: 8px;
PADDING-BOTTOM: 2px;
PADDING-LEFT: 2px;
PADDING-RIGHT: 2px;
PADDING-TOP: 2px;
POSITION: absolute;
VISIBILITY: hidden;
WIDTH: 127px;
Z-INDEX: 10
}
.MainContent {
POSITION: absolute;
LEFT: 150px;
}
.MenuTop {
Position: absolute;
Top: 85;
Left: 5px;
}
.LogoTop {
Position: relative;
Top: 5;
Left: 5px;
}