Results 1 to 9 of 9

Thread: DD Tab Menu installation problem

  1. #1
    Join Date
    Jun 2009
    Posts
    8
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default DD Tab Menu installation problem

    1) Script: DD Tab Menu

    2) http://www.dynamicdrive.com/dynamicindex1/ddtabmenu.htm


    Hi,

    I have installed the “solid block” DD Tab Menu on a website and we are having a problem, which I’m not sure if it is script related or something else related to the pages themselves. When clicking on any of the nav buttons, the banner and nav bar appear but the rest of the page loads as if it is separate; however, I’m thinking that I have done something wrong when installing the menu. Could someone please look at the coding for the menu and see if it is correct? The site itself is www.blackbirdbakerybristol.com.

    Code:
    <script type="text/javascript">
    ddtabmenu.definemenu("ddtabs3", 1) 
    </script>
    
    <div id="ddtabs3" class="solidblockmenu">
    <ul>
    <li><a href="index.html">Home</a></li>
    <li><a href="menu.html">Menu</a></li>
    <li><a href="about.html">About</a></li>
    <li><a href="contact.html" style="border:none">Contact</a></li>
    </ul>
    <br style="clear: left" />
    </div>
    Also, what copyright notice should I use with this menu? The page the menu came from does not have one.

    Thank you in advance for your help and your time.

    Renee

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    At the moment the script on your page doesn't run for me, since the reference to the .js file is broken:

    Code:
    <script type="text/javascript" src="javascript/ddtabmenu.js">
    
    
    <script type="text/javascript">
    ddtabmenu.definemenu("ddtabs3", 1) 
    </script>
    You'll need to update the code in red above so it correctly points to where the .js file is on your server. As far as where the credit notice should go, it should be in between the script tags, ie:

    Code:
    <script type="text/javascript" src="ddtabmenufiles/ddtabmenu.js">
    
    /***********************************************
    * DD Tab Menu script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
    * This notice MUST stay intact for legal use
    * Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
    ***********************************************/
    
    </script>
    DD Admin

  3. #3
    Join Date
    Jun 2009
    Posts
    8
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Thank you. At this time, I have updated the code only on the contact page with the correct location of the .js file, www.blackbirdbakerybristol.com/contact.html, since the page doesn't seem to load correctly.

    The updated code is:


    Code:
    <script type="text/javascript" src="ddtabmenu.js">
    
    /***********************************************
    * DD Tab Menu script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
    * This notice MUST stay intact for legal use
    * Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
    ***********************************************/
    
    </script>
    
    <script type="text/javascript">
    ddtabmenu.definemenu("ddtabs3", 1) 
    </script>
    I am also getting an error message in IE that says 'ddtabmenu' is undefined.

    Thanks again for the help.

  4. #4
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    FYI the error will appear in all browsers, as comparing your version of ddtabmenu.js to the original, the two are different. Your version is missing commas (,) that should follow each function within the script, ie:

    Code:
    definemenu:function(tabid, dselected){
    	this[tabid+"-menuitems"]=null
    	this[tabid+"-dselected"]=-1
    	this.addEvent(window, function(){ddtabmenu.init(tabid, dselected)}, "load")
    },
    Did you run the script through some compression software perhaps? Anyway, try redownloding the original .js file, and uploading that one.
    DD Admin

  5. #5
    Join Date
    Jun 2009
    Posts
    8
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    No, I didn't run the script through any compression software.

    Ok, I have redownloaded the original .js file and uploaded it to the server. However, the page is loading the banner and nav bar, then the rest of the page loads, and I haven't experienced this with any of your other scripts before.

    As well, I am now getting an error message that 'document.getElementByld(...) is null or not an object. Not sure if this is a problem or not.

    I do appreciate your help with this.

  6. #6
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    You need to give your menu's outermost DIV a id of "ddtabs3", as that's what you have specified in your initialization code:

    Code:
    <script type="text/javascript">
    ddtabmenu.definemenu("ddtabs3", 1) 
    </script>
    DD Admin

  7. #7
    Join Date
    Jun 2009
    Posts
    8
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    That was certainly a stupid mistake on my part. Sorry.

    I have now placed the correct code on all 4 pages; however, on the nav bar, menu is retaining the hover color regardless of the page. If you have time, could you please let me know why this is happening? I have tried looking over the code on the page, and it is the same as the others www.blackbirdbakerybristol.com/menu.html.

    Thanks again!

  8. #8
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Are you asking why the 2nd menu item is always highlighted? That's because in the initialization code on each page, you've specified the 2nd item be to selected, by way of the 2nd parameter:

    Code:
    <script type="text/javascript">
    ddtabmenu.definemenu("ddtabs3", 1) 
    </script>
    1=2nd tab, 0=1st etc.
    DD Admin

  9. The Following User Says Thank You to ddadmin For This Useful Post:

    Blackbird (12-10-2009)

  10. #9
    Join Date
    Jun 2009
    Posts
    8
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Thank you for your help and your time. Things are working now.

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
  •