HTML - Rollovers

Discussion in 'Off Topic Chat' started by vonDrehle, Aug 31, 2005.

  1. vonDrehle

    vonDrehle TPF Noob!

    Joined:
    Jun 27, 2005
    Messages:
    430
    Likes Received:
    6
    Location:
    North Carolina
    Can others edit my Photos:
    Photos OK to edit
    I am making a webpage for my eCommerce class. I just finished one of the rollovers and was wondering if I were to use several rollovers on the same page do I have to put in the entire code for each one or is there a short cut?

    I haven't started my site yet, just working on design, but here are the codes for the roll over.

    <!-- ImageReady Preload Script (Untitled-1) -->
    <SCRIPT LANGUAGE="JavaScript">
    <!--function newImage(arg) {if (document.images) {rslt = new Image();rslt.src = arg;returnrslt;}}function changeImages() {if (document.images && (preloadFlag == true)) {for (var i=0; i<changeImages.arguments.length; i+=2) {document[changeImages.arguments].src = changeImages.arguments[i+1];}}}var preloadFlag = false;function preloadImages() {
    if (document.images) {test_01_over = newImage("images/test_01-over.gif");preloadFlag = true;}}
    // -->
    </SCRIPT>
    <!-- End Preload Script -->

    <body bgcolor=white text=red link=white vlink=white onload="preloadImages();">

    <!-- ImageReady Slices (Untitled-1) -->
    <A HREF="#"ONMOUSEOVER="changeImages('test_01', 'images/test_01-over.gif'); return true;"ONMOUSEOUT="changeImages('test_01', 'images/test_01.gif'); return true;">
    <IMG NAME="test_01" SRC="images/test_01.gif" WIDTH=63 HEIGHT=26 BORDER=0></A>
    <!-- End ImageReady Slices -->

    Thanks...


    And the only software we are currently using for coding is Notepad, Wordpad, or any other generic program you might use. So no "help" if you will.
     
  2. mentos_007

    mentos_007 The Freshmaker!

    Joined:
    Jun 29, 2004
    Messages:
    9,325
    Likes Received:
    102
    Location:
    Poland, Sz-n
    Can others edit my Photos:
    Photos OK to edit
    oh gosh you have a mess in your code :) I am afraid I can't help youw ith this one but I'd suggest cleaning your code and organizing it in a more "readable" one...:
    --------------------------------------------

    <!-- ImageReady Preload Script (Untitled-1) -->
    <SCRIPT LANGUAGE="JavaScript">
    <!--function newImage(arg)
    {if (document.images)
    {
    rslt = new Image();
    rslt.src = arg;returnrslt;
    }
    }
    function changeImages()
    {if (document.images && (preloadFlag == true))
    {for (var i=0; i<changeImages.arguments.length; i+=2)
    {document[changeImages.arguments].src = changeImages.arguments[i+1];
    }
    }
    }
    var preloadFlag = false;function preloadImages()
    {
    if (document.images) {test_01_over = newImage("images/test_01-over.gif");preloadFlag = true;
    }
    }
    // -->
    </SCRIPT>
    <!-- End Preload Script -->

    <body bgcolor=white text=red link=white vlink=white onload="preloadImages();">

    <!-- ImageReady Slices (Untitled-1) -->
    <A HREF="#"ONMOUSEOVER="changeImages('test_01', 'images/test_01-over.gif');
    return true;
    "ONMOUSEOUT="changeImages('test_01', 'images/test_01.gif');
    return true;">
    <IMG NAME="test_01" SRC="images/test_01.gif" WIDTH=63 HEIGHT=26 BORDER=0></A>
    <!-- End ImageReady Slices -->

    ----------------------------------------------------------------
    there's no help included but it is not so messy now... :p
     
  3. ferny

    ferny TPF Noob!

    Joined:
    Aug 31, 2004
    Messages:
    8,115
    Likes Received:
    64
  4. vonDrehle

    vonDrehle TPF Noob!

    Joined:
    Jun 27, 2005
    Messages:
    430
    Likes Received:
    6
    Location:
    North Carolina
    Can others edit my Photos:
    Photos OK to edit




    I didn't write it I just took it from image ready. ;)
    Thanks


    **And last night I worked a little more on it and I think I came out with something that should work.
     

Share This Page