SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Addict
    Join Date
    Oct 2004
    Location
    NYC
    Posts
    306
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Javascript image help

    Hi all,

    This is what I am trying to do:

    I am working on a webpage which I have divided into two columns:

    Left and right.

    Left part has three thumbnails. I want to be able to click whichever thumbnail and want to have that clicked thumbnail to appear on within in right colum. Any help be appreciated.

    Thank you much.

  2. #2
    SitePoint Wizard
    Join Date
    Mar 2001
    Posts
    3,537
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    and want to have that clicked thumbnail to appear on within in right colum.
    Does that pass for effective communication in NY?

  3. #3
    SitePoint Addict
    Join Date
    Oct 2004
    Location
    NYC
    Posts
    306
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    LOL ....... NY is one of a kindda place. A task such as Communication here is connectionless.......

  4. #4
    SitePoint Wizard
    Join Date
    Nov 2004
    Location
    Nelson BC
    Posts
    2,310
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Very quick and dirty, something like this?


    Code:
    <html>
    <head>
    <script language="JavaScript">
    function switchimg(id, src)
    {
        document.images[id].src=src;
    }
    </script>
    </head>
    <table border=1>
    <tr>
        <td>
            <img src="delete_button.gif" onclick="switchimg('row1', this.src);">
            <img src="edit_button.gif"  onclick="switchimg('row1', this.src);">
            <img src="tools_button.gif"  onclick="switchimg('row1', this.src);">
        </td>
        <td><img id="row1" src="spacer.gif"></td>
    </tr>
    <tr>
        <td>
            <img src="delete_button.gif" onclick="switchimg('row2', this.src);">
            <img src="edit_button.gif"  onclick="switchimg('row2', this.src);">
            <img src="tools_button.gif"  onclick="switchimg('row2', this.src);">
        </td>
        <td><img id="row2" src="spacer.gif"></td>
    </tr>
    </table>
    </html>

  5. #5
    SitePoint Addict
    Join Date
    Oct 2004
    Location
    NYC
    Posts
    306
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Talking Thank you

    Hi Jim,


    Thank you so much. This is beautiful................


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
  •