SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Apr 2002
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    NN4 - Swapping image within a SPAN tag

    In NN4, I am trying to do an image swap that is embedded withing a SPAN tag. If I pull the image out of the SPAN tag, it works fine. I think I may need to call it differently when I do the swap but I'm not sure how. All of this works fine in IE (as usual!).

    Here's my code!

    <SPAN id="linkList" style="position:relative;visibility:hidden;">
    <IMG NAME="arrow1" SRC="REDARROW.GIF" BORDER=0>
    <A HREF="javascript:void(0)" class="sublink" onClick="window.open('http://www.test.com')" arrow1.src='goldarrow.gif'; return true;" onMouseOut="arrow1.src='redarrow.gif';">
    Testing
    </A>
    </SPAN>

    Thanks in advance!

  2. #2
    SitePoint Evangelist azizur_rahman's Avatar
    Join Date
    Nov 2001
    Location
    London, UK
    Posts
    502
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    make sure you have the Unique id :
    id="linkList"

    different for every item you have, other wise it wont work.
    Azizur Rahman
    Web Application Developer

  3. #3
    .net install meltdown
    Join Date
    May 2001
    Location
    View Ridge
    Posts
    692
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    confused

    Why do you have the visibility of the <span> tag set to hidden??

  4. #4
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    <span id="linkList" style="position:relative;" onclick="window.open('http://www.test.com')">
      <
    a href="#" class="sublink"  onmouseover="arrow2.src='2.jpeg';" onMouseOut="arrow2.src='3.jpeg';">
        <
    img name="arrow2" src="REDARROW.GIF" border="0">Testing<br />
      </
    a>
    </
    span
    try that not sure what your after though


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •