Hello. I have a php script wich uses a dropdown menu to list out files in a directory. It works fine on Windows with Internet Explorer, but on my new IMAC and Firefox it wount work.
Is there a way to get dropdown menue to work in Firefox ?
Below is my script that doesnt work with Firefox.
<select onchange="window.location.href(this.options[this.selectedIndex].value);
this.selectedIndex=0;" class=form><option>Choose Page</option>
<?php
$myFiles=array();
$homedir = "filer/encyclopedia";
$dir = opendir("$homedir");
while(FALSE !== ($file = readdir($dir))) {
if($file=="."||$file==".."||$file=="vis"||$file=="encyclopedia.php"||ereg("txt|balanitis|fnct|example", $file)) { }
else {
$myFiles[] = "$file";
}
}
closedir($dir);
$teller = count($myFiles);
sort($myFiles);
reset($myFiles);
foreach($myFiles as $value) {
echo "<option value=index.php?cat=filer/encyclopedia/$value>".ucfirst(substr($value,0,-4))."</option>";
}
echo "</select> ";
echo "$teller files";
?>