Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Jun 2003
    Location
    Australia
    Posts
    528
    Thanks
    8
    Thanked 8 Times in 8 Posts

    OnChange problem

    Okay - bare in mind I know very little about JavaScript - can someone tell me what I am doing wrong? Basically I want the picture to change upon selecting a different option. (This also has PHP in it but would not effect the JavaScript in anyway.)

    <select size='1' onChange='showImgSelected("avatar", "avatar", "avatar", "", "http://www.ysuperleague.com/system/images/")' name='avatar' id='avatar'>

    <?
    $count = 1;
    while ($count < 151) {

    echo "<option value='$count.gif'># $count</option>";
    $count = $count + 1;
    }
    ?>
    </select>
    <img src='http://www.ysuperleague.com/system/images/avatar/1.gif' name='avatar' id='avatar' alt='' />

    Thanks in advance
    Taylor

  • #2
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    we don't see the function you are firing onChange... Where's the function showImgSelected ()?
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*


  •  

    Posting Permissions

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