SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Nov 2002
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    link description /flyout menu

    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

  2. #2
    SitePoint Member
    Join Date
    Nov 2002
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    ?

    can nobody help?

  3. #3
    SitePoint Member
    Join Date
    Nov 2002
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    *bump*

  4. #4
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    #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>
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev




  5. #5
    SitePoint Member
    Join Date
    Nov 2002
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    thx for your reply

    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

    Code:
    <script>
    function setPic(source) {
    document.getElementById('desc').src = source;
    }
    </script>
    Whats source and whats desc (sorry for the dump question but as said I`m a newbie)

    source= http://url.to.pic ?

    but whats desc?

    Thanks in advance
    Pott

  6. #6
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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>
    Last edited by beetle; Nov 13, 2002 at 10:43.
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev





Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •