Creating a hierarchical dropdown

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sweeps78
    Senior Member
    • Aug 2006
    • 266
    • 3.7.x

    Creating a hierarchical dropdown

    Hi,

    I'm trying to create a hierarchical dropdown, but am having a problem with the positioning of the 3rd+ levels. The second level positions just as expected, directly underneath the parent. However, the third level displays in the upper left of the screen. I've went through my code numerous times, but can't see any reason why the 3rd level doesn't appear directly underneath the parent, just as the second level does.

    Could someone take a look at my code:


    PHP Code:
    <tr>
       <
    td class="alt2">

          <!-- 
    The Community -->
          <
    table border="0" cellpadding="0" cellspacing="0" width="100%">
                 <
    tr>
                     <
    td>
                         <
    img src="$stylevar[imgdir_misc]/navbits_start.gif" alt=""/> <b>The Community</b>
                     </
    td>
                 </
    tr>
                 <
    tr onmouseover="this.className='alt1'" onmouseout="this.className='alt2'">
                     <
    td>
                         <
    img src="$stylevar[imgdir_misc]/navbits_dash.gif" alt=""/>
                         <
    a href="{$vboptions[bburl]}/{$vbulletin->options[forumhome]}.php"Forums </a>
                         <
    span id="topforums"><script type="text/javascript"vbmenu_register("topforums"); </script></span>
                     </
    td>
                 </
    tr>
                 <if 
    condition="$show['member']">
                     <
    tr onmouseover="this.className='alt1'" onmouseout="this.className='alt2'">
                         <
    td>
                             <
    img src="$stylevar[imgdir_misc]/navbits_dash.gif" alt=""/>
                             <
    a href="{$vbulletin->options[bburl]}/usercp.php"User Control Panel </a>
                         </
    td>
                     </
    tr>
                 </if>
                 <
    tr onmouseover="this.className='alt1'" onmouseout="this.className='alt2'">
                     <
    td>
                         <
    img src="$stylevar[imgdir_misc]/navbits_dash.gif" alt=""/>
                         <
    a href="{$vbulletin->options[bburl]}/blog.php">Community Blogs</a>
                     </
    td>
                 </
    tr>
                 <
    tr onmouseover="this.className='alt1'" onmouseout="this.className='alt2'">
                     <
    td>
                         <
    img src="$stylevar[imgdir_misc]/navbits_dash.gif" alt=""/>
                         <
    a href="{$vboptions[bburl]}/gallery">Community Galleries</a>
                     </
    td>
                 </
    tr>
                 <
    tr onmouseover="this.className='alt1'" onmouseout="this.className='alt2'">
                     <
    td>
                         <
    img src="$stylevar[imgdir_misc]/navbits_dash.gif" alt=""/>
                         <
    a href="$vboptions[bburl]/$vboptions[contactuslink]rel="nofollow">$vbphrase[contact_us]</a>
                     </
    td>
                 </
    tr>
          </
    table>
          <!-- / 
    The Community -->

          <!-- 
    Forums Menu2nd level This one works just fine-->
          <
    div class="vbmenu_popup" id="topforums_menu" style="display:none;margin-left:20px;">
               <
    table cellpadding="4" cellspacing="1" border="0">
                      <
    tr>
                          <
    td class="thead">Forums</td>
                      </
    tr>
                      <
    tr>
                          <
    td class="vbmenu_option">
                              <
    a href="{$vboptions[bburl]}/forumdisplay.php?f=101">Project Showcase</a>
                          </
    td>
                      </
    tr>
                      <
    tr>
                          <
    td class="vbmenu_option">
                              <
    a href="{$vboptions[bburl]}/forumdisplay.php?f=22">Robotics </a>
                              <
    span id="robotics_forums"><script type="text/javascript"vbmenu_register("robotics_forums"); </script></span>
                          </
    td>
                      </
    tr>
               </
    table>
          </
    div>
          <!-- / 
    Links menu -->

          <!-- 
    Robotics Forum Menu3rd level This is the one that displays in the upper left corner of the screen-->
          <
    div class="vbmenu_popup" id="robotics_forums_menu" style="display:none;position:absolute;margin-left:20px;">
               <
    table cellpadding="4" cellspacing="1" border="0">
                      <
    tr>
                          <
    td class="vbmenu_option">
                              <
    a href="{$vboptions[bburl]}/forumdisplay.php?f=9">Robotics General Discussion</a>
                          </
    td>
                      </
    tr>
               </
    table>
          </
    div>
          <!-- / 
    Links menu -->
       </
    td>
    </
    tr
  • Jake Bunce
    Senior Member
    • Dec 2000
    • 46598
    • 3.6.x

    #2
    I just tried to create nested popup menus using vBulletin's popup code. I experienced the same problem with positioning. It appears those popup menus don't nest well. I don't have a fix for you.

    Comment

    • sweeps78
      Senior Member
      • Aug 2006
      • 266
      • 3.7.x

      #3
      Can't I set the absolute positioning or something? I just find it strange that it works just fine at the 2nd tier but not any higher tiers.

      Comment

      • Jake Bunce
        Senior Member
        • Dec 2000
        • 46598
        • 3.6.x

        #4
        Actually my second tier didn't even work.

        I have never tried using positioning code. If no one else here is able to help you then I recommend you post on www.vbulletin.org.

        Comment

        • sweeps78
          Senior Member
          • Aug 2006
          • 266
          • 3.7.x

          #5
          Ouch, it just dawned on me that I didn't test the dropdowns out in IE. Thanks for getting back to me on this Jake, else I probably wouldn't have found out for a while. None of the tiers show up at all in IE, only Firefox

          Dang Internet Exploder! Any idea why tiers would work in Firefox but not in IE?

          Comment

          • Jake Bunce
            Senior Member
            • Dec 2000
            • 46598
            • 3.6.x

            #6
            Welcome to the world of browser compatibility issues.

            Comment

            • sweeps78
              Senior Member
              • Aug 2006
              • 266
              • 3.7.x

              #7
              Ok, Now I know I'm not crazy... well, not that crazy at least

              I just removed the code completely from my forum, and I still cannot get even the default vBulletin dropdowns to work. Any ideas?

              Comment

              • Jake Bunce
                Senior Member
                • Dec 2000
                • 46598
                • 3.6.x

                #8
                The default menus should certainly work, assuming they are enabled:

                Admin CP -> vBulletin Options -> Style & Language Settings -> Use 'vBMenu' DHTML Popup Menus?

                If they still don't work then try it on the default style. It might be a problem with your custom style.

                Comment

                • sweeps78
                  Senior Member
                  • Aug 2006
                  • 266
                  • 3.7.x

                  #9
                  The default menus should certainly work, assuming they are enabled:

                  Admin CP -> vBulletin Options -> Style & Language Settings -> Use 'vBMenu' DHTML Popup Menus?
                  I just checked this out and it is enabled...

                  I had no knowledge of the vBulletin system when I originally installed it, so my default style isn't really a "default" style. The default style was what I kept modifying when I first started out. Then, at one point, I copied this style and created my own.

                  At any rate, I tried to change the Default Style option under "Style & Language Settings" back to what is called the default, but it didn't work either. The dropdowns still don't work in IE

                  EDIT: Any idea on where I should start? Should I look in edited templates, or should I look in the header, headerinclude, etc. stuff?

                  Comment

                  • Jake Bunce
                    Senior Member
                    • Dec 2000
                    • 46598
                    • 3.6.x

                    #10
                    Admin CP -> Styles & Templates -> Style Manager -> [Add New Style]

                    Create a new style with no parent. Then click that style's name in the Style Manager to view your forum with that style. That will be a fresh default style.

                    Comment

                    • sweeps78
                      Senior Member
                      • Aug 2006
                      • 266
                      • 3.7.x

                      #11
                      I found out that this is only occurring on my main portal page. I'm using vbAdvanced, and the index.php page is actually a purely vbAdvanced page. There's a link to the main forums page, which has some vbAdvanced modules, but all of the dropdowns work fine there.

                      I know this is now considered a vbAdvanced problem, and I'm going over there now to see if anyone else experienced this, but if you have any ideas, I'd appreciate your input

                      Comment

                      • Jake Bunce
                        Senior Member
                        • Dec 2000
                        • 46598
                        • 3.6.x

                        #12
                        I have never heard of vBAdvanced causing problems with dropdown menus. I don't know what the specific problem could be.

                        Comment

                        • sweeps78
                          Senior Member
                          • Aug 2006
                          • 266
                          • 3.7.x

                          #13
                          Hi Jake,

                          thank you for all of your help and patience! I actually found a bug in the vba default News module. This was causing my problem. Took me all freakin day to figure it out, but at least I figured it out Check out this thread for more details.

                          thaks again!

                          Comment

                          widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                          Working...