PDA

View Full Version : CSS/JS dropdown menu not working



annagilli
05-28-2012, 02:11 PM
Hello - Hope I'm doing this right as it's my first time on this forum... I've downloaded one of your templates (Example 1 of http://www.dynamicdrive.com/dynamicindex1/droptabmenu.htm) and amended it to the style of my site and added to my web page (still a work in progress as you'll see). Links and tabs work fine but the drop down menus just won't work. Have tried everything - can anyone spot the problem?

Many thanks for your help,
Anna


1) CODE TITLE: Eye cancer website

2) AUTHOR NAME/NOTES: Anna Pethen

3) DESCRIPTION: I've downloaded one of your templates and amended it to the style of my site and added to my web page. Links and tabs work fine in code but drop down just won't work - there should be drop menus on the 2nd-8th tabs. Have tried everything - can anyone spot the problem?

4) URL ATTACHED: http://www.makingsense.co.uk/index-dropdown-2

ddadmin
05-28-2012, 10:39 PM
There may be other issues, but the references to both "dropdowntabmenu.js" and "ooss-test-dd.css" on your page are broken:


<script type="text/javascript" src="dropdowntabfiles/dropdowntabs.js">

/***********************************************
* Drop Down Tabs Menu- (c) 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>

<!-- CSS for Drop Down Tabs Menu #1 -->
<link rel="stylesheet" type="text/css" href="ooss-test-dd.css" />

Make sure these two files are uploaded per the paths specified in the code above, or change the paths to where they reside on your server.

annagilli
05-29-2012, 07:26 AM
Many thanks DDAdmin - I'll give it a go and see if I can resolve them...

Best,
Anna

annagilli
05-29-2012, 07:42 AM
Hi again,

I've linked to the CSS and JS files by browsing - on the link at the top of the code and also the one underneath the dropmenu lists - so they should be fine but it's still not working.

Would you mind having another look at it for me please? Completely baffled! :-)

http://www.makingsense.co.uk/index-dropdown-2

Many thanks for your time,
Anna

ajfmrf
05-29-2012, 12:19 PM
Well, I spent a little time on this and got the menu working.
http://www.web-user.info/test/test1.html

What I did was extract the dropdown css from the big file it was in and just put the menu on a page with that css,the js file that is needed and nothing else.

It seems that there is something that messes things up when this css is added to the rest of the the file.

I don't have time right now to try and see what is going on but there must be something happening.

I would try and put both this (css file by it self) and the other one ( the rest of that css file) css/ooss-test-dd.css and see if it works when all of it is ther but not all one one file.

annagilli
05-29-2012, 12:39 PM
Thanks so much Bud, I'll try it all out and see how it goes...

I have deleted all code but the menu CSS and it's not worked so far but I will persevere! :-)

Thanks again,
Anna

annagilli
05-29-2012, 12:52 PM
It seems to be working! Very happy :-)

I went through your code bit by bit and matched it and the issue was with this code:

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

I had added a "src="js/dropdowntabs.js" to the top line somehow and when I deleted it it worked! There are now a couple minor issues with the style but easily sorted... phew!

Thanks again for your help Bud,

All the best,
Anna