codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Problem with Fold out menu - HELP PLS!  Archive Import (alex) at 07:13 on Sunday, April 13, 2003
 

Hello everyone,
I`m using a fold out menu for navigating, i have a problem with the sub-menues.
Basically, the menu has 2 levels, top menu and sub menues.
I have about 17 top-menues with about 5 sub-menues on each top-menues.
The problem is the 12th top-menu displays the 2nd sub-menues, 13th top displayed 3rd sub and so forth...
Up to 11th top level works fine...

I think the below string controls this...
=====================================================
function menu(num){
if(bw.bw){
if (!stayFolded){
for (var i=0; i<oSub.length; i++){
if (i!=num){
oSub.hideIt()
if (foldImg)oTop.ref["imgA"+i].src = unImg.src
}
}
for(var i=1; i<oTop.length; i++){
oTop.moveIt(0,oTop[i-1].y+oTop[i-1].h)
}
}
if (oSub[num].vis()){
oSub[num].showIt()
if (foldImg)oTop[num].ref["imgA"+num].src = exImg.src
}else{
oSub[num].hideIt()
if(foldImg)oTop[num].ref["imgA"+num].src = unImg.src
}
for(var i=1; i<oTop.length; i++){
if (!oSub[i-1].vis()) oTop.moveIt(0,oTop[i-1].y+oTop[i-1].h+oSub[i-1].h+mainOffsetY)
else oTop.moveIt(0,oTop[i-1].y+oTop[i-1].h+mainOffsetY)
}
}
}
===========================================

Each of the sub-menu has these strings:
=============================================
<div id="divTop6" class="clTop"><a href="#" onclick="menu(6); return false" onfocus="this.blur()"><img src="/images/foldoutmenu_arrow.gif" name="imgA6" width=12 height=12 alt="" border="0"> Hyundai Excel</a><br>
<div id="divSub6" class="clSub">
==============================================
The above string works fine, its only after name="imgA9" and when the code changes to name="imgA10", the problem occurs.
I think the double digit in the code.

Can you help?

Any help will be greatly appreciated.

Cheers,
Alex








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Re: C++ Beginner question
•  Re: function within loop problem
•  moncler outlet
•  Re: Display swf file in pdf
•  Re: how to create forum using asp.net with c# language?
•  Discount coach store
•  Create Better Maps with Global Mapper
•  Re: How to display a message box when record is temporary stored in session/grid view
•  Sharing object in perl


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2012