Announcement

Collapse
No announcement yet.

Input button images/mouseover

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

    Input button images/mouseover

    I am changing the standard input buttons through checkout etc. with gif buttons using for example:

    <form>
    <INPUT TYPE="image" VALUE="CLOSE WINDOW" NAME="ACTION_CLOSE" SRC="buttonclosewindow1.gif" ALT="Close This Window" Title="CLOSE WINDOW" ONCLICK="javascript:window.close();">
    </form>

    Elswhere I use the little mousover routine:

    onMouseOver="javascript:SwapImage('closebutton','buttonclosewindow2.gif')" onMouseOut="RestoreImage();"
    (where 'closebutton' would be the name asigned to "buttonclosewindow1.gif"

    How can I incorporate this with the above code? I cannot see where or how to asign the the image name that I would normally add to the <img src> tag.
    Graham

    ___________________________________

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

    #2
    The quickest way to alter the src of an image is like this:

    Code:
    <img src="image1.jpg" onmouseover="this.src='image2.jpg';" onmouseout="this.src='image1.jpg';" />
    Use the exact same onmouseover/out routines for a form button or anything with a 'src' property. This doesn't require any other Actinic defined javascript functions.
    Last edited by Kermy; 23-Sep-2005, 01:44 PM. Reason: typo
    www.gbradley.co.uk
    Web Development, Actinic Patches, Scripts & more

    Comment


      #3
      brilliant!

      thanks

      leads me to wonder why actinic put their own mousover routine in?
      Graham

      ___________________________________

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

      Comment

      Working...
      X