#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    Frederick,MD USA
    Posts
    6
    Rep Power
    0
    I am trying to perform an image swap in a form using the input type of 'image'. For some reason, onmouseover or onmouseout does not work when I assign it different images:

    <form onsubmit="window.open('weblink.html')">
    <input name="image1' type=image src="image.jpg" border=0 onclick="submit()"
    onmouseover="document.image1.src="imagealt.jpg"
    onmouseout="document.image1.src="image.jpg">
    </form>
    I have tried using onmouseout/onmouseover in various combinations to achieve the effect and it only seems to work OUTSIDE of the form tags.
    Can anyone offer any useful advice?
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Posts
    4
    Rep Power
    0
    I dont know for sure but I would try document.form.image1.src... Maybe the image becomes part of the form object once inside the tags?

    Just a guess, I'm a novice

    Daari

Similar Threads

  1. Finding Images in HTML
    By beardo in forum PHP Development
    Replies: 14
    Last Post: March 28th, 2004, 06:29 AM
  2. image swapping
    By slm in forum HTML Programming
    Replies: 2
    Last Post: March 17th, 2003, 07:52 PM
  3. Javascript image preload race condition
    By lmcccha in forum JavaScript Development
    Replies: 5
    Last Post: February 13th, 2003, 08:21 PM
  4. swapping an image in a layer
    By szyslak in forum HTML Programming
    Replies: 1
    Last Post: August 13th, 2001, 03:20 PM
  5. image swapping in forms?
    By SaucePi in forum HTML Programming
    Replies: 1
    Last Post: August 15th, 2000, 11:54 AM

IMN logo majestic logo threadwatch logo seochat tools logo