I want to make acustom selection. I use a cod for shown all directories from current directory, in a dropdown menu, but when i select anything from the menu, i’m not redireced to selection… here are the code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script>
function goToPage(url)
{
if (url != "")
{
.open(url);
}
}
</script>
</head>
<body>
<select name="myDirs" onchange="goToPage(this.options(this.selectedIndex).value)">
<option value="" selected="selected">Select directory</option>
<?php
$dirs = glob("*", GLOB_ONLYDIR);
foreach($dirs as $val){
echo '<option value="'.$val.'">'.$val."</option>n";
}
?>
</select>
</body>
</html>
Please help. Thank you.