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
    Feb 2006
    Posts
    262
    Thanks
    23
    Thanked 1 Time in 1 Post

    Post Work fine in FF but half-way with IE ???

    Good day,
    The code below is working fine in FF but when I try it in IE, it generate everything but when I change the image with the drop down box it don't change the image as supposed with javascript function.

    Do somebody see something wrong in my code ?



    PHP Code:

       <td width="200" valign="top" align="left" class="black">
    <script language="JavaScript" type="text/javascript" >
    function changePic(fe){
    var opt_key = fe.selectedIndex;
    var fileName = fe.options[opt_key].value;
    document.noimage.src=fileName;
    return true;
    }
    </script>
    <br>
    Image :<br>
    <center><select name="image" onchange="changePic(this);">
      <option>[Choisir une image]</option>
    <?php

       
    function recur_dir($dir)
       {
           
    $dirlist opendir($dir);
           while (
    $file readdir ($dirlist))
           {
               if (
    $file != '.' && $file != '..')
               {
                   
    $newpath $dir.'/'.$file;
                   
    $level explode('/',$newpath);
                   if (
    is_dir($newpath))
                   {
                       
    $mod_array[] = array(
                               
    'level'=>count($level)-1,
                               
    'path'=>$newpath,
                               
    'name'=>end($level),
                               
    'kind'=>'dir',
                               
    'mod_time'=>filemtime($newpath),
                               
    'content'=>recur_dir($newpath));
                echo 
    '<OPTION>'.$newpath.'</option>';
                   }else{
      
                       
    $mod_array[] = array(
                               
    'level'=>count($level)-1,
                               
    'path'=>$newpath,
                               
    'name'=>end($level),
                               
    'kind'=>'file',
                               
    'mod_time'=>filemtime($newpath),
                               
    'size'=>filesize($newpath));
                echo 
    '<OPTION value='.$newpath.'>'.$newpath.'</option>';
                  }
               }
           }
           
    closedir($dirlist);
           return 
    $mod_array;
       }
       
       
    print_r(recur_dir('Images'));
    echo 
    '</select></center>';


    ?>
    <br>
    <center><img src="peuplies-1-man-small.bmp" width="100"  id="noimage" align="center"></center>

  • #2
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    This is a Javascript issue then? There is a Javascript forum for just such a problem.


  •  

    Posting Permissions

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