Announcement

Collapse
No announcement yet.

onMouseOver

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

    onMouseOver

    Throughout my site I use the little mouseover routine that has been discused on the forum example below:

    <img src="partillustration1.gif" name="illbutton" border="0" width="320" height="80" alt="Open Briggs and Stratton parts illustrations" onMouseOver="SwapImage('illbutton','partillustration2.gif')" onMouseOut="RestoreImage();"></a><br><br>

    Where partillustration2.gif is the mousover image for partillustration1.gif.

    This works fine throughout the site actinic pages embeded in the text with the <!-- --!>html quotes, but it will not work within a raw html page which I have created.

    Everything is in the site1 folder.

    Graham
    Graham

    ___________________________________

    www.Briggsbits.co.uk
    The online store for Briggs and Stratton spare parts

    #2
    I believe 'swapimage' and 'restorimage' are javascript functions declared elsewhere, which is why it won't work.

    But you don't need it. You can use native javascript functions as follows:

    <IMG SRC="image1.gif" onmouseover="imagename.src='image2.gif'" onmouseout="imagename.src='image1.gif'" width=xx height=xx alt="Image alt text" name="imagename">

    Mike
    -----------------------------------------

    First Tackle - Fly Fishing and Game Angling

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

    Comment


      #3
      This is because the SwapImage() and RestoreImage() are functions that are created by Actinic, and stored in Actiniccore.js. Place this in the <head> section of your raw page:

      Code:
      <script type="text/javascript" src="actiniccore.js"></script>
      The browser now knows where the functions are stored, and can get on with swapping your images.

      EDIT: Beaten to it! Either method will do, though
      Last edited by Kermy; 31-Aug-2005, 10:39 AM. Reason: typo
      www.gbradley.co.uk
      Web Development, Actinic Patches, Scripts & more

      Comment


        #4
        Success again!!!!!!!

        Thanks
        Graham

        ___________________________________

        www.Briggsbits.co.uk
        The online store for Briggs and Stratton spare parts

        Comment

        Working...
        X