Page 1 of 1

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

Posted: Wed Jul 18, 2007 1:45 pm
by Peuplarchie
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 ?


Code: Select all

<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>

Posted: Wed Jul 18, 2007 1:47 pm
by superdezign
You'll have to be more clear about *where* the error is occurring.

Posted: Wed Jul 18, 2007 2:12 pm
by John Cartwright
Moved to Client-Side.

This is your 3rd duplicate thread.. please make it your last or we will be forced to enforce the rules.

Posted: Thu Jul 19, 2007 3:52 am
by UrButtFullOfArr0ws
<td width="200" valign="top" align="left" class="black">
<script language="JavaScript" type="text/javascript" >
:? Aren't scripts such as javascript supposed to go in the <head> element and table in the <body> element?

Edit @ gente: Yeah i saw that just a bit earlier where a script wouldnt allow me to put it in head but instead had to put it in body. But does this means that tables are also allowed in <head>? :)

Posted: Thu Jul 19, 2007 7:04 am
by Gente
UrButtFullOfArr0ws wrote:
<td width="200" valign="top" align="left" class="black">
<script language="JavaScript" type="text/javascript" >
:? Aren't scripts such as javascript supposed to go in the <head> element and table in the <body> element?
Aren't.

Posted: Thu Jul 19, 2007 11:17 am
by Peuplarchie
Jcart wrote:Moved to Client-Side.

This is your 3rd duplicate thread.. please make it your last or we will be forced to enforce the rules.
same code, different questions.