PDA

View Full Version : Javascript Menu Displaying Incorrectly



Lovemonk
Mon 6th Aug '07, 7:12am
Hi everyone, how's it going? Good I hope.

My main site has a navigation bar that uses a Javascript drop down function thing, you can see in action here (http://www.media-live.co.uk/test.php). That's how it's supposed to work.

On my forum however, it's going wrong and not displaying correctly. You can see it pooping up here (http://www.media-live.co.uk/forums/?styleid=3).

I'm not sure how to fix this, does anyone know? If so i'd really appreciate the help.


Thanks

Colin F
Mon 6th Aug '07, 7:41am
It's likely conflicting with the style or Javascript in vBulletin. Unfortunately I can't tell you what you'd need to change to fix this.

Lovemonk
Mon 6th Aug '07, 7:53am
Awwwww snuffle puffs. Well, thanks anyway Colin.

kiwilerner
Tue 7th Aug '07, 6:14pm
Hey, I remember this menu! :)

Hi again, Lovemonk. The problem's easy to spot: you haven't added the dropdown code to the forum's version of the menu.

Here's what you have on the main page:



<ul id="nav">

<li><a href="http://www.media-live.co.uk/index.php">Home</a></li>
<li><a href="default.htm" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menu1, '150px')" onMouseout="delayhidemenu()">News</a></li>
<li><a href="default.htm" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menu2, '150px')" onMouseout="delayhidemenu()">Columns</a></li>
<li><a href="default.htm" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menu3, '150px')" onMouseout="delayhidemenu()">Reviews</a></li>
<li><a href="http://www.media-live.co.uk/forums/">Forums</a></li>
<li><a href="http://www.media-live.co.uk/forums/arcade.php">Arcade</a></li>
<li><a href="default.htm" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menu5, '150px')" onMouseout="delayhidemenu()">Misc</a></li>
<li><a href="default.htm" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menu4, '150px')" onMouseout="delayhidemenu()">About</a></li>
<li><a href="http://www.media-live.co.uk/contact.php">Contact</a></li>
<li><a href="http://www.media-live.co.uk/links.php">Links</a></li>
</ul>

But what you have in the forum is simply:


<ul>
<li><a href="#">Home</a></li>
<li><a href="#">News</a></li>
<li><a href="#">Extras</a></li>
<li><a href="http://www.media-live.co.uk/forums/">Forums</a></li>
<li><a href="http://www.media-live.co.uk/forums/arcade.php">Arcade</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Contact</a></li>
<li><a href="#">Links</a></li>
</ul>

Make the changes so it matches the homepage code.

Next, you need to include a reference to the script that's running the menus. If you look in the homepage HEAD section, the code is as follows:


<script type="text/javascript" src="http://www.media-live.co.uk/includes/drop-down-menu.js"></script>

To add this to your forum's head section, open your style's templates and edit the HEADINCLUDE template. Add the above code to the template, save and test.

This should help ... I hope! Good luck.

Lovemonk
Tue 7th Aug '07, 7:31pm
Hi kiwilerner,

I did add the other stuff, and the link to the Javascript links but it wasn't working. So when Colin said what he said, I decided to just take it out. Which i'm assuming is when you came in and read the source, seeing the now altered menu etc. :p

kiwilerner
Tue 7th Aug '07, 7:38pm
Oh dear. Well, that was a waste of time then!