4WebHelp
 FAQ  •  Search  •  User Groups  •  Forum Admins  •  Smilies List  •  Statistics  •  Rules   •  Login   •  Register
Toggle Navigation Menu

 Navigation Bars
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic
Author Message
Chris
Junior WebHelper
Junior WebHelper


Joined: 23 Nov 2003
Posts: 2
Location: Cumbria, UK

PostPosted: Mon Nov 24, 2003 8:36 pm (13 years, 11 months ago) Reply with QuoteBack to Top

Hey all,

Newbie here, I was wondering if you could help me in any way possible? I would like to create a navigation bar, a bar that when you scroll over it some sub links show under the the hovered button..

If I don't make sense I'm sorry, but here is an example of what I would like to learn/do www.blackfoot.co.uk

If anyone could help me that would be great

cheers, Chris
OfflineView User's ProfileFind all posts by ChrisSend Personal MessageSend emailMSN Messenger
adam
Forum Moderator & Developer



Joined: 26 Jul 2002
Posts: 704
Location: UK

PostPosted: Tue Nov 25, 2003 12:38 pm (13 years, 11 months ago) Reply with QuoteBack to Top

I did this once before; it's done using javascript in a mouseover, something like this:
Code:
<a href="...whatever..." onMouseOver="showMenu(first); return true" onMouseOut="hideMenu(first); return true;">Link 1</a>
<div id="first" style="display: none;">Menu</div>
<a href="...whatever2..." onMouseOver="showMenu(second); return true" onMouseOut="hideMenu(second); return true;">Link 1</a>
<div id="second" style="display: none;">Menu</div>


and then the javascript would be something like:
Code:
<script language="JavaScript">
<!--
function showMenu(menuName) {
     menuName.style="";
}
function hideMenu(menuName) {
     menuName.style="display: none;";
}


that might not work exactly as it is, as it has been some time since I did any javascript, but it should be pretty close.

________________________________
It's turtles all the way down...
OfflineView User's ProfileFind all posts by adamSend Personal MessageVisit Poster's Website
Darren
Team Member



Joined: 05 Feb 2002
Posts: 549
Location: London

PostPosted: Tue Nov 25, 2003 1:42 pm (13 years, 11 months ago) Reply with QuoteBack to Top

You might also want to look at the source for the blackfoot example you gave. From a brief look, as far as I can tell it looks like the JavaScript used to make this menu was generated by Macromedia Fireworks. Doing a search for mm_menu on Macromedia gives various bits of info about it.

If you don't have fireworks you could try the 30 day trial, should be long enough to generate the menu Very Happy
OfflineView User's ProfileFind all posts by DarrenSend Personal MessageVisit Poster's Website
Chris
Junior WebHelper
Junior WebHelper


Joined: 23 Nov 2003
Posts: 2
Location: Cumbria, UK

PostPosted: Thu Nov 27, 2003 10:17 am (13 years, 11 months ago) Reply with QuoteBack to Top

Hey all, thank you for your responses, much apreciated.

However, one more question...

Q: am I correct in sayin' that you have to create the buttons in which will appear when you hover over the main button? if so thats fine, but where do you actually place them? next to the main set of buttons? or does that code put them there automatically?

sorry for being a pain...still a newbie to JavaScript i guess

cheers

Chris
OfflineView User's ProfileFind all posts by ChrisSend Personal MessageSend emailMSN Messenger
Darren
Team Member



Joined: 05 Feb 2002
Posts: 549
Location: London

PostPosted: Thu Nov 27, 2003 11:15 am (13 years, 11 months ago) Reply with QuoteBack to Top

Yes, you would create an 'up' and an 'over' state for each button. You would then just place the up button in your html. The javascript (which are just the standard swap image fuinctions from Macromedia) are then used to swap to the over image and restore it back again. the bit I've marked in red is the bit responsible for the swapping of the button image. The bits marked green are doing the sub menu.

<a href="index.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image4','','images/home_over.jpg',1)"><img src="images/home.jpg" alt="Home" name="Image4" width="59" height="40" border="0" onMouseOver="MM_showMenu(window.mm_menu_1023181102_0,0,40,null,'Image4')" onMouseOut="MM_startTimeout();"></a>

N.B. these are calling functions defined elsewhere on the page
OfflineView User's ProfileFind all posts by DarrenSend Personal MessageVisit Poster's Website
Display posts from previous:      
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic


 Jump to:   




You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot edit your posts in this forum.
You cannot delete your posts in this forum.
You cannot vote in polls in this forum.


Page generation time: 0.064057 seconds :: 17 queries executed :: All Times are GMT
Powered by phpBB 2.0 © 2001, 2002 phpBB Group :: Based on an FI Theme