Results 1 to 2 of 2

Thread: Image selector II

  1. #1
    Join Date
    May 2010
    Posts
    1
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Image selector II

    I would appreciate some assistance.

    I want to use the above script on this site to list fabric, as there is a lot I wish to break the list alaphabetically.

    Is it possisble to use the script more than once on a page, when I tried putting the script on twice it seemed to stop working.

    If I can not, has anyone seen a script that could be used in this way

  2. #2
    Join Date
    Dec 2008
    Location
    Portsmouth, UK
    Posts
    1,794
    Thanks
    2
    Thanked 419 Times in 413 Posts

    Default

    presume you are refering to http://www.javascriptkit.com/script/cut174.shtml

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    
    <head>
      <title></title>
    <script language="javascript">
    
    
    function showimage(sel,imgid){
     var img=document.getElementById(imgid);
     var s=sel.value.split('|')
     img.src=s[0];
     img.parentNode.href=s[1]||'#';
    }
    
    </script></head>
    
    <body>
    <table border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td width="100%">
    <form name="mygallery">
    <p>
    <select name="picture" size="1" onChange="showimage(this,'pictures')">
    <option selected value="http://www.vicsjavascripts.org.uk/StdImages/One.gif|http://www.abcnews.com">Picture of me</option>
    <option value="http://www.vicsjavascripts.org.uk/StdImages/Two.gif|http://www.cnn.com">Picture of my aunt</option>
    <option value="http://www.vicsjavascripts.org.uk/StdImages/Three.gif|http://www.geocities.com">Picture of my brother</option>
    </select></p>
    <select name="picture" size="1" onChange="showimage(this,'pictures')">
    <option selected value="http://www.vicsjavascripts.org.uk/StdImages/Four.gif|http://www.abcnews.com">Picture of me</option>
    <option value="http://www.vicsjavascripts.org.uk/StdImages/Five.gif|http://www.cnn.com">Picture of my aunt</option>
    <option value="http://www.vicsjavascripts.org.uk/StdImages/Six.gif|http://www.geocities.com">Picture of my brother</option>
    </select></p>
    </form>
    </td>
    </tr>
    <tr>
    <td width="100%"><p align="center"><a href="#" onMouseover="window.status='';return true"><img src="me.gif" id="pictures" width="99" height="100" border=0></a></td>
    </tr>
    </table>
    </body>
    
    </html>
    Vic
    God Loves You and will never love you less.
    http://www.vicsjavascripts.org/Home.htm
    If my post has been useful please donate to http://www.operationsmile.org.uk/

  3. The Following User Says Thank You to vwphillips For This Useful Post:

    prh108 (05-10-2010)

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
  •