SitePoint Sponsor

User Tag List

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

    floating menu help

    Hello
    I am doing a floating menu on a *very ugly template that someone requested* http://www.overskilled.com/portfolio/tmjartglass.com
    They wanted a hover menu that would follow the user so I put that on there from a free archive script. But the button does know do a mouseover. I don't know why it won't. I was wondering if someone could help me with it? Here is the code



    <script language=javascript>


    element="<a href=# onMouseOver='document.the_image.src=images/home2.gif;' onMouseOut='document.the_image.src=images/home1.gif;'> <img src='images/home1.gif' name='the_image' border='0'></a>"
    el_left=0
    el_top=85

    ns4=document.layers
    ie4=document.all
    ns6=document.getElementById&&!document.all

    if (ns4){document.write('<layer name="element" top='+el_top+' left='+el_left+'>'+element+'</layer>')}
    else{document.write('<div id="element" style="position:absolute;top:'+el_top+';left:'+el_left+'">'+element+'</div>')}

    el_left_start=el_top_start=0

    function el_move(){
    if(ie4){ydiff=el_top_start-document.body.scrollTop; xdiff=el_left_start-document.body.scrollLeft}
    else{ydiff=el_top_start-pageYOffset; xdiff=el_left_start-pageXOffset}

    if(ydiff!=0){movey=Math.round(ydiff/10);el_top_start-=movey}
    if(xdiff!=0){movex=Math.round(xdiff/10);el_left_start-=movex}

    if(ns4){document.layers.element.top=el_top_start+el_top;document.layers.element.left=el_left_start+el_left}
    if(ie4){document.all.element.style.top=el_top_start+el_top;document.all.element.style.left=el_left_start+el_left}
    if(ns6){document.getElementById("element").style.top=el_top_start+el_top;document.getElementById("element").style.left=el_left_start+el_left}
    }
    elmove=setInterval("el_move()",10)

    </script>
    overskilled.com
    composing the efuture

  2. #2
    Perl/Mason Guru Flawless_koder's Avatar
    Join Date
    Feb 2002
    Location
    Gatwick, UK
    Posts
    1,206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Working?

    From you're link it actually seems to be working?!

    Flawless
    ---=| If you're going to buy a pet - get a Shetland Giraffe |=---

  3. #3
    SitePoint Member
    Join Date
    Nov 2001
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, but the mouseover on the floating HOME button doesn't work.
    overskilled.com
    composing the efuture

  4. #4
    Perl/Mason Guru Flawless_koder's Avatar
    Join Date
    Feb 2002
    Location
    Gatwick, UK
    Posts
    1,206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    huh?!

    When i put my mouse over home the little ball next to it glows yellow (by the way, dhtml and css filters could do this without images).

    Is that not what's meant to happen?

    Flawless
    ---=| If you're going to buy a pet - get a Shetland Giraffe |=---


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
  •