hi guys,
I`m searching for a dhtml/java script as shown in the example below.
example
1. the flyout menus (found some at dynamicdrive)
2. the link description above the menu (only found textlink description)
Any help is very appreciated.
Pott
| SitePoint Sponsor |
hi guys,
I`m searching for a dhtml/java script as shown in the example below.
example
1. the flyout menus (found some at dynamicdrive)
2. the link description above the menu (only found textlink description)
Any help is very appreciated.
Pott
can nobody help?![]()
*bump*
#2 in you first post is just a simple image swap....Code:<script> function setPic(source) { document.getElementById('desc').src = source; } </script> <img id="desc" src="pic1.gif" /> <a href="blah.htm" onmouseover="setPic('blah.gif')">Link</a>
hi,
thanks for your reply.
Sorry, I`m a complete newbie in javascript programming (thats the problem).
So if I understand the code right, this will display a textlink and onmouseover an image. Is it possible to combine this with a "standard" dhtml dropdown/flyout menu?
A question about your code snippet
Whats source and whats desc (sorry for the dump question but as said I`m a newbie)Code:<script> function setPic(source) { document.getElementById('desc').src = source; } </script>
source= http://url.to.pic ?
but whats desc?
Thanks in advance
Pott
Ok, desc is the ID of the image (a name I picked, you can choose anything that isn't a reserved keyword in Javascript or the DOM) and source is the parameter variable (also something I picked, same rules apply) that recieves the image source as a string. If the concept of functions and passing/receiving parameters is over your head, then I suggest you take some begninning javascript tutorials or get some beginner books.
And yes, one could get this to work in conjunction with another script (including 'flyout' menus)
I'll color code things in my snippet that have a relationship so you can perhaps see what is going on.Code:<script> function setPic(source) { document.getElementById('desc').src = source; } </script> <img id="desc" src="pic1.gif" /> <a href="blah.htm" onmouseover="setPic('blah.gif')">Link</a>
Bookmarks