Mouseover link into a drop down menu..

liunx

Guest
Ive been trying to work out how to do this easily but cant seem to find the answer anywhere? I mean like on <!-- m --><a class="postlink" href="Http://www.microsoft.com">Http://www.microsoft.com</a><!-- m --> and <!-- m --><a class="postlink" href="http://www.ebuyer.com">http://www.ebuyer.com</a><!-- m --><br />
<br />
where you mouse over a link and it drops down a menu with more links..<br />
<br />
Anyone who can help me learn how to do this has my muchas appreciation :)<!--content-->I like to look at the page source code to see how these things work. You can do this in any browser. Cut the appropriate chunk of code out and then experiment with it on a standalone page.<!--content-->Yes I do know, but in this case it isnt that easy, I cant make sense of the source, I was wondering maybe there is a tutorial out there somewhere?<!--content-->Easy..... no....<br />
<br />
on ebuyer.com<br />
<br />
The menu is in a js file.<br />
The script is in the head:<br />
(but the real script is in a Directory called js)<br />
<script language="JavaScript" src=http://www.htmlforums.com/archive/index.php/"/js/functions.js"></script><br />
<script language="JavaScript" src=http://www.htmlforums.com/archive/index.php/"/js/YPmenu.js"><br />
// include the menu system<br />
</script><br />
<script language="JavaScript"><br />
new ypSlideOutMenu("brands", "down", 150, 50,150,500);<br />
new ypSlideOutMenu("cats", "down", 250, 50, 150,490);<br />
new ypSlideOutMenu("account", "down", 350, 50, 150,230);<br />
new ypSlideOutMenu("help", "down", 450, 50, 150,230);<br />
</script><br />
</head><br />
<br />
In the body is the call to show or hide:<br />
<td width="115"><a href=http://www.htmlforums.com/archive/index.php/"/customer/help/index.html" onmouseover="ypSlideOutMenu.showMenu('help');hideme();" onmouseout="ypSlideOutMenu.hideMenu('help');showme();"><br />
<br />
So: view Source or use save as to find out more.<br />
<br />
:rocker:<!--content-->Just found the link:<br />
<!-- m --><a class="postlink" href="COOLMENUhttp://www.dhtmlcentral.com/coolmenus/Download">COOLMENUhttp://www.dhtmlcentral.com/coolmenus/Download</a><!-- m --> <!--more-->.asp<br />
<br />
:rocker: :rocker:<!--content-->That's one Peter, of many, although admittedly, it's also one of the better ones. Some other goodies are:<br />
<br />
* <!-- m --><a class="postlink" href="http://www.burmees.nl/menu/menus.htm">http://www.burmees.nl/menu/menus.htm</a><!-- m --><br />
* <!-- m --><a class="postlink" href="http://www.webreference.com/dhtml/hiermenus/">http://www.webreference.com/dhtml/hiermenus/</a><!-- m --> (but ya gotta pay for that one, although it's the one the big pro sites use - generally)<br />
<br />
Neil<!--content-->ALRIGHT! I worked out how to do it using the tutorial on <br />
<br />
<!-- m --><a class="postlink" href="http://www.solardreamstudios.com/tutorials/dw/navmenu/#">http://www.solardreamstudios.com/tutorials/dw/navmenu/#</a><!-- m --><br />
<br />
however, once I mouseover the link and get the menu to appear, I cant get it to disappear again when the link is not mouse overed, any idea how I can fix this??<br />
<br />
Heres what I got so far, mouse over "Link" to see what I mean,<br />
<br />
<!-- m --><a class="postlink" href="http://homepage.ntlworld.com/s.spencer2/nuozek/newstuff/layout.htm">http://homepage.ntlworld.com/s.spencer2 ... layout.htm</a><!-- m --><!--content-->There is an onmouseout command, though I am still deciding exactly where to place that, and what to do with it.<!--content-->thanks man :)<!--content-->ALRIGHT!! I worked it out, wooot!<br />
<br />
thanks for all your helps guys, the onmouseout, just needed to be added, not to any specific location.. thankyou =)<!--content-->ok dammnit, still not quite there! If anyone can get this to work on individual tables with links in, please post back with some code/examples, if really apreciate it :/<br />
<br />
having more trouble getting that to work :(<!--content-->There are no HTML problems (<!-- m --><a class="postlink" href="http://validator.w3.org/check?uri=http%3A%2F%2Fhomepage.ntlworld.com%2Fs.spencer2%2Fnuozek%2Fnewstuff%2Flayout.htm&charset=%28detect+automatically%29&doctype=HTML+4.01+Transitional&ss=&outline=&sp=">http://validator.w3.org/check?uri=http% ... tline=&sp=</a><!-- m -->) stopping it from working (though you could have a type="text/javascript" attribute added on to the script tag for completeness).<br />
<br />
Post the code you have now...<!--content-->Code I got so far is here,<br />
<br />
<!-- m --><a class="postlink" href="http://homepage.ntlworld.com/s.spencer2/nuozek/newstuff/layout2.htm">http://homepage.ntlworld.com/s.spencer2 ... ayout2.htm</a><!-- m --><br />
<br />
if u paste into Dreamweaver u will understand a little better probably!<!--content-->Hmm, I haven't got DW. I don't fully understand what I am looking at, but check the Parse Tree [at the bottom of this page (<!-- m --><a class="postlink" href="http://validator.w3.org/check?uri=http%3A%2F%2Fhomepage.ntlworld.com%2Fs.spencer2%2Fnuozek%2Fnewstuff%2Flayout2.htm&charset=%28detect+automatically%29&doctype=HTML+4.01+Transitional&ss=&outline=&sp=">http://validator.w3.org/check?uri=http% ... tline=&sp=</a><!-- m -->)] to see the structure. Are all the mouse commands associated with the correct tags, and calling the correct function? There is also one place with a mouseover but no mouseout I see.<!--content-->phew! im getting closer,<br />
<br />
<!-- m --><a class="postlink" href="http://homepage.ntlworld.com/s.spencer2/nuozek/newstuff/layout2.htm">http://homepage.ntlworld.com/s.spencer2 ... ayout2.htm</a><!-- m --><br />
<br />
still seems to be problems with what it selects :/<br />
<br />
ill try working some more in the morning, thxz for ure help Giz!<!--content-->Big trouble nuozek<br />
when i put the mouse cursor on the right site of the browserwindow (layout2) and drag it to the left......<br />
menus show up on the wrong place.<br />
<br />
That's why the table needs STYLE="position:absolute;<br />
And the mouse over has also to be IN the div.<br />
<br />
Look what i have done in the attachment.<br />
Play with it...<br />
And.. the menu has to show up closer up to the link top:28px; so you can go to it with the mouse cursor.<br />
<br />
<br />
<br />
:rocker:<!--content-->Yeah I see what you have done! Thanx man that helps alot, but what does "DIV ID" stand for? and how did you make it set out like that in Dreamweaver? or didnt you...<!--content-->Originally posted by nuozek <br />
Yeah I see what you have done! Thanx man that helps alot, but what does "DIV ID" stand for? and how did you make it set out like that in Dreamweaver? or didnt you... <br />
<br />
When you was fighting with the code, i was fighting with it to ;)<br />
I have done this kind of menu before.<br />
So i knew it would not show up in the right place on another resolution.<br />
So i had to use the absolute attribute.<br />
<br />
Div is used in a block<br />
span is used in a line<br />
<br />
ID is needed to Identify Data<br />
and the name used to get the right ID<br />
<br />
A ID can also be placed in the head.<br />
<br />
The Div is often used in style sheets.<br />
An ID can only be use once on a page by the same name.<br />
A style is called in the div by class=name and can be used often on the same page.<br />
<br />
And the Dreamweaver code in the head is a script.<br />
In this part i had nothing to change.<br />
<br />
Tip:<br />
use a text editor to put your most used codes in.<br />
I use notetab <!-- w --><a class="postlink" href="http://www.notetab.com">www.notetab.com</a><!-- w --><br />
I have files mycodes.txt javascripts.txt mouseover.txt and so on.<br />
So when i see a nice code on this form or the internet:<br />
copy and past.<br />
<br />
When i need the code for a popupwindow i look in a notetab file and copy and past in my html editor.<br />
<br />
:rocker:<!--content-->ah ok, so is there an option for setting things out like that in Dreamweaver? Something I may of missed.. <br />
<br />
Did u do the editing in Dreamweaver, or just use notepad? If so.... NICE ;)<!--content-->Dreamweaver has a lot of options.<br />
But i don't have Dreamweaver.<br />
I work with Arachnophilia V4 or MaxBeautyHtml<br />
<br />
:rocker:<!--content-->thanks for all your help, finally got everything how I want it, I can post the finished product here (when tis done) if you like, or if you have AIM we can talk there.<!--content-->Your welcome<br />
or in Dutch: graag gedaan ;)<br />
If your site is on line ask for a review and i will see the URL.<br />
<br />
:rocker: :rocker: :rocker:<!--content-->
 
Back
Top