Announcement

Collapse
No announcement yet.

Hard Coded Rollovers

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Hard Coded Rollovers

    Hi

    I want to put a hard coded menu on all pages Brochure & Shop.
    I've got the images in but I'd like to get rollovers on the images.

    I used image ready to create the graphics and rollovers and have included the following script in the header.

    <SCRIPT LANGUAGE="JavaScript" SRC="actiniccore.js" TYPE="text/javascript"></SCRIPT><script LANGUAGE="JavaScript" type="text/javascript">
    <!--
    function newImage(arg) {
    if (document.images) {
    rslt = new Image();
    rslt.src = arg;
    return rslt;
    }
    }
    function changeImages() {
    if (document.images && (preloadFlag == true)) {
    for (var i=0; i<changeImages.arguments.length; i+=2) {
    document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
    }
    }
    }
    var preloadFlag = false;
    function preloadImages() {
    if (document.images) {
    home2 = newImage("home2.gif");
    shop2 = newImage("shop2.gif");
    about2 = newImage("about2.gif");
    terms2 = newImage("terms2.gif");
    contact2 = newImage("contact2.gif");
    search2 = newImage("search2.gif");
    preloadFlag = true;
    }
    }
    // -->
    <!--end rollover script-->
    </script>


    I then call the changeImages() function with onmouseover.
    The link is working but the rollover aint and its not causing any errors.

    Any Suggestions
    C

    #2
    OOps

    Sorry my own fault.

    I put the preload function as the last attribute of the body tag BUT out side of the onload attribute.

    So its fixed.

    Comment

    Working...
    X