SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    May 2002
    Posts
    67
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Arrow Javascript and OnMouseOver

    I was wondering if anybody know's if this is the best way to do a mouseover navigation and which browsers support this?

    ------------------------------------------------------

    <SCRIPT language="JavaScript">

    <!-- hide this script from non-javascript-enabled browsers

    if (document.images)
    {
    home_off = new Image(57,15);home_off.src = 'images/home_off.gif';
    home_on = new Image(57,15);home_on.src = 'images/home_on.gif';

    about_off = new Image(70,15);about_off.src = 'images/about_off.gif';
    about_on = new Image(70,15);about_on.src = 'images/about_on.gif';

    top_off = new Image(70,15);top_off.src = 'images/top_off.gif';
    colony_on = new Image(70,15);top_on.src = 'images/top_on.gif';

    goals_off = new Image(70,15);goals_off.src = 'images/goals_off.gif';
    goals_on = new Image(70,15);goals_on.src = 'images/goals_on.gif';

    profit_off = new Image(120,15);profit_off.src = 'images/profit_off.gif';
    profit_on = new Image(120,15);profit_on.src = 'images/profit_on.gif';

    faq_off = new Image(57,15);faq_off.src = 'images/faq_off.gif';
    faq_on = new Image(57,15);faq_on.src = 'images/faq_on.gif';

    links_off = new Image(62,15);links_off.src = 'images/links_off.gif';
    links_on = new Image(62,15);links_on.src = 'images/links_on.gif';

    contact_off = new Image(67,15);contact_off.src = 'images/contact_off.gif';
    contact_on = new Image(67,15);contact_on.src = 'images/contact_on.gif';

    }

    function di(id,action)
    {
    if (document.images)
    {
    document.images[id].src=eval(id+"_"+action+".src");
    }
    }

    // stop hiding -->
    </SCRIPT>

    ------------------------------------------------------

    Thanks in advance, Cosmic.

  2. #2
    Weird Little Girl Desdelena's Avatar
    Join Date
    May 2002
    Location
    Canada
    Posts
    266
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I always use the method on this page as it is NN3+ and IE4+ compatible.

  3. #3
    What? Maelstrom's Avatar
    Join Date
    Oct 2001
    Location
    Whistler BC originally from Guelph Ontario
    Posts
    2,175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Maelstrom Personal - Apparition Visions
    Development - PhP || Mysql || Zend || Devshed
    Unix - FreeBSD || FreeBsdForums || Man Pages
    They made me a sitepoint Mentor - Feel free to PM me or Email me and I will see if I can help.


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
  •