PDA

View Full Version : help about Dropdowntabs please..



hmtpn
08-13-2007, 09:12 AM
1) Script Title: Drop Down Tabs (5 Styles)

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/droptabmenu.htm



3) Describe problem: Hi, i am writing from Turkey, and i hope my English will be understandable enough to describe the problem. i used the menu, following the instructions, and it was working on my computer before hosting the web site. But when i hosted my site and tried to open the page it is opened with this error message :

Line: 134
Char: 1
Error: 'tabdropdown' is undefined
Code: 0
...................................................................................

i am new in these issues and i am trying my best to learn. i have no idea about what can be the problem. the url of my website is www.mutfaktalezzet.com it is in Turkish, but you'll see the problem easily.... Thanks in advance

tech_support
08-14-2007, 08:52 AM
I don't see a tabdropdown.init("bluemenu", 0) anywhere on your page.

From the readme:



3) Script to call in the HEAD section of your page to initialize a Tab Menu instance:

Finally, with both parts of a Drop Down Tabs defined, you should call the following script to initialize it on the page:


<script type="text/javascript">
//SYNTAX: tabdropdown.init("menu_id", [integer OR "auto"])
tabdropdown.init("bluemenu", 0)
</script>


The first parameter (highlighted in red) should be the ID of the Menu Tab to initialize once the page has fully loaded. The second parameter is optional, and lets you set which tab should be selected by default- enter either an integer (0=1st tab, 1=2nd tab etc), or "auto" to have the script try to automatically select the tab that matches the current page's URL *. And that's it!

* Note that the "auto" select tab feature mentioned above is rudimentary and isn't meant to replace directly selecting or using server side scripting to identify which tab corresponds to the current page. It won't account for all possibilities where two URLs are the same. Use it as a convenience and fallback plan!

hmtpn
08-14-2007, 01:10 PM
Thanks for reply Peter, but in the html code given in this url, http://www.dynamicdrive.com/dynamicindex1/droptabmenu.htm, there are five different dropdown tabs, and i wanted to use the first one in my page. I didn't change the names and id of any item, and in the code it is written like

<div id="colortab" class="ddcolortabs">
<ul>
<li><a href=".............................

for the first one. And i kept it as it is. And i have the following code in my page.

<script type="text/javascript">
//syntax: tabdropdown.init("menu_id", [integer OR "auto"])
tabdropdown.init("colortab", 3)
</script>

Should i still have tabdropdown.init("bluemenu", 0) anywhere on my document, and why?

hmtpn
08-14-2007, 09:11 PM
Thanks peter,
i am writing this the second time, i don't know what happened with the first one. in the code given in this site (drop down tabs (5 styles)) there are 5 different styles of dropdowntabs, and i wanted to use the first one.. so i copied and pasted the first part of the html document. the id of the first dropdown tab is colortab, defined like:

<div id="colortab" class="ddcolortabs">
<ul>
<li><a href="................

and i have the following part in my code:

<script type="text/javascript">
//SYNTAX: tabdropdown.init("menu_id", [integer or "auto"])
tabdropdown.init("colortab", 3)
</script>


isn't it enough or should i still have tabdropdown.init("bluemenu", 0) in my code, ad why?
Thanks again.........

tech_support
08-15-2007, 10:51 AM
Try changing it back to "bluemenu" and see what happens.