image changes when we point with mouse, how?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Vinutha
    New Member
    • Nov 2006
    • 19

    image changes when we point with mouse, how?

    I am desiging some webpages.

    so if we see this website www.symphonysv. com,
    there we can see some text in the middle row. when we point those texts with mouse, the image in the side changes.

    How to do this...........
    can u give some code example.......

    Thanks,
    Vinutha.
  • Johny Rodriguez
    New Member
    • Dec 2006
    • 8

    #2
    var newimage =new Image(); newimage.src=//the url of the new image
    function suffleimg(){
    document.images .oldimage.src=n ewimage.src;
    }

    <td id="middletext " on mouseover="suff leimage()">the text in the middle</td>

    of course you still have to add the onmouseout to restore the orignal one...

    Comment

    • Vinutha
      New Member
      • Nov 2006
      • 19

      #3
      Hi Johny,

      Thanks for your code.
      I have tried this but its giving some error like this,
      "doument.images .oldimage" is null or not an object.

      How to resolve this..........

      Thanks,
      Vinutha.

      Comment

      • Johny Rodriguez
        New Member
        • Dec 2006
        • 8

        #4
        Originally posted by Vinutha
        Hi Johny,

        Thanks for your code.
        I have tried this but its giving some error like this,
        "doument.images .oldimage" is null or not an object.

        How to resolve this..........

        Thanks,
        Vinutha.
        You've assigned the proper id's to the image and the td? maybe paste it here.

        Comment

        Working...