Results 1 to 7 of 7

Thread: Help with Drop down menu

  1. #1
    Join Date
    Nov 2008
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Help with Drop down menu

    hello everyone,

    I've just started learning how to use Expression Web and have Dreamweaver CS3 aswell. I want a drop down menu for my website, but when following the instruction i get lost. Probably cos i have no idea. Could someone help, or point me in the right direction with a video tutorial.

    Thanks Tom

  2. #2
    Join Date
    Nov 2008
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    sorry have been reading other threads and thought the code may help.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns="urn:schemas-microsoft-comfficeffice">

    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>HomeAbout UsPropertiesProperties</title>
    <style type="text/css">
    script {
    }
    ul {
    }
    </style>
    <link rel="stylesheet" type="text/css" href="chromestyle2.css" />
    <link rel="stylesheet" type="text/css" href="chromestyle3.css" />
    <link rel="stylesheet" type="text/css" href="bluetabs.css" />
    </head>

    <body>

    <div>
    <div id="bluemenu" class="bluetabs">
    <ul>
    <li><a href="http://www.dynamicdrive.com">Home</a></li>
    <li><a href="http://www.dynamicdrive.com/style/" rel="dropmenu1">CSS</a></li>
    <li><a href="http://www.dynamicdrive.com/resources/" rel="dropmenu2">Partners</a></li>
    <li><a href="http://tools.dynamicdrive.com">Tools</a></li>
    <li></li>
    </ul>
    </div></div>

    <div>
    <!--1st drop down menu -->
    <div id="dropmenu1" class="dropmenudiv">
    <a href="http://www.cssdrive.com">CSS Drive</a>
    <a href="http://www.javascriptkit.com">JavaScript Kit</a>
    <a href="http://www.codingforums.com">Coding Forums</a>
    <a href="http://www.javascriptkit.com/jsref/">JavaScript Reference</a>
    </div></div>


    </body>

    </html>

    the link to the DDSript is: http://www.dynamicdrive.com/dynamicindex1/ddtabmenu.htm

    Thanks

  3. #3
    Join Date
    Sep 2008
    Location
    Bristol - UK
    Posts
    842
    Thanks
    32
    Thanked 132 Times in 131 Posts

    Default

    A link to the site where this is hosted would be appreciated to see this in action, but from looking at the code it doesn't look like you've included the file "ddtabmenu.js", which is needed to make the menu work,

    Jack.

  4. #4
    Join Date
    Nov 2008
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    hey thanks for the reply

    i haven't got a site that i can show you yet i'm still working on it. What do i do with the .js file? Where does it go?

    Thanks again

  5. #5
    Join Date
    Sep 2008
    Location
    Bristol - UK
    Posts
    842
    Thanks
    32
    Thanked 132 Times in 131 Posts

    Default

    You need to include the following between the <head> tag.

    and then put this code in:

    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>
    
    <script type="text/javascript">
    //SYNTAX: ddtabmenu.definemenu("tab_menu_id", integer OR "auto")
    ddtabmenu.definemenu("ddtabs1", 0) //initialize Tab Menu #1 with 1st tab selected
    ddtabmenu.definemenu("ddtabs2", 1) //initialize Tab Menu #2 with 2nd tab selected
    ddtabmenu.definemenu("ddtabs3", 1) //initialize Tab Menu #3 with 2nd tab selected
    ddtabmenu.definemenu("ddtabs4", 2) //initialize Tab Menu #4 with 3rd tab selected
    ddtabmenu.definemenu("ddtabs5", -1) //initialize Tab Menu #5 with NO tabs selected (-1)
    
    </script>
    Make sure the .js file is in the same place as your HTML file, hope this helps.

    Code:
    ddtabmenu.definemenu("ddtabs1", 0)
    the "ddtabs1" is the id of the div you have, and change the "0" to "-1" if you want no tab to be selected as default

    Tell me if you have any more problems

  6. #6
    Join Date
    Nov 2008
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hey

    I'm still not getting the drop down part. when you hover over the button.

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Tab 1Tab 2Tab 3Tab 4You can have</title>
    <link rel="stylesheet" type="text/css" href="solidblocksmenu.css" />
    <link rel="stylesheet" type="text/css" href="SpryTabbedPanels.css" />
    <link rel="stylesheet" type="text/css" href="ddcolortabs.css" />
    </head>
    
    <body>
    
    <div>
    <div id="colortab" class="ddcolortabs">
    
    <ul>
    <li><a href="http://www.dynamicdrive.com" title="Home"><span>Home</span></a></li>
    <li><a href="http://www.dynamicdrive.com/new.htm" title="New"><span>New</span></a></li>
    <li><a href="http://www.dynamicdrive.com/style/" title="CSS" rel="dropmenu1_a"><span>
    CSS</span></a></li>
    <li><a href="http://www.dynamicdrive.com/resources/" title="Partners" rel="dropmenu2_a"><span>
    Partners</span></a></li>	
    <li><a href="http://tools.dynamicdrive.com" title="Useful Tools"><span>Tools</span></a></li>	
    </ul>
    </div>
    
    <div class="ddcolortabsline">&nbsp;</div>
    
    
    <!--1st drop down menu -->                                                   
    <div id="dropmenu1_a" class="dropmenudiv_a">
    <a href="http://www.dynamicdrive.com/style/csslibrary/category/C1/">Horizontal 
    CSS Menus</a>
    <a href="http://www.dynamicdrive.com/style/csslibrary/category/C2/">Vertical CSS 
    Menus</a>
    <a href="http://www.dynamicdrive.com/style/csslibrary/category/C4/">Image CSS</a>
    <a href="http://www.dynamicdrive.com/style/csslibrary/category/C6/">Form CSS</a>
    <a href="http://www.dynamicdrive.com/style/csslibrary/category/C5/">DIVs and 
    containers</a>
    <a href="http://www.dynamicdrive.com/style/csslibrary/category/C7/">Links and 
    Buttons</a>
    <a href="http://www.dynamicdrive.com/style/csslibrary/category/C8/">Other</a>
    </div>
    
    
    <!--2nd drop down menu -->                                                
    <div id="dropmenu2_a" class="dropmenudiv_a" style="width: 150px;">
    <a href="http://www.cssdrive.com">CSS Drive</a>
    <a href="http://www.javascriptkit.com">JavaScript Kit</a>
    <a href="http://www.codingforums.com">Coding Forums</a>
    <a href="http://www.javascriptkit.com/jsref/">JavaScript Reference</a>
    </div>
    
    <script type="text/javascript">
    //SYNTAX: tabdropdown.init("menu_id", [integer OR "auto"])
    tabdropdown.init("colortab", 3)
    </script>
    
    </div>
    
    </body>
    
    </html>
    Even tried copying the code from the page source and it still doesn't work.

    Any ideas

    thanks

  7. #7
    Join Date
    Sep 2008
    Location
    Bristol - UK
    Posts
    842
    Thanks
    32
    Thanked 132 Times in 131 Posts

    Default

    You still haven't linked the .js file in the <head> section, you have to link the .js file to make it work, all you've linked so far is the CSS, add this to your <head> section:

    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>
    
    <script type="text/javascript">
    //SYNTAX: ddtabmenu.definemenu("tab_menu_id", integer OR "auto")
    ddtabmenu.definemenu("ddtabs1", 0) //initialize Tab Menu #1 with 1st tab selected
    ddtabmenu.definemenu("ddtabs2", 1) //initialize Tab Menu #2 with 2nd tab selected
    ddtabmenu.definemenu("ddtabs3", 1) //initialize Tab Menu #3 with 2nd tab selected
    ddtabmenu.definemenu("ddtabs4", 2) //initialize Tab Menu #4 with 3rd tab selected
    ddtabmenu.definemenu("ddtabs5", -1) //initialize Tab Menu #5 with NO tabs selected (-1)
    
    </script>

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
  •