Jump to content

[SOLVED] Open in new window


wazza103

Recommended Posts

Hey

 

Got this script working but want it to open in a new window/tab :

 

<form name="htmlMenu">

    <select name="htmlSelList" size="1">

 

<?

 

$file_dir="./Directors/Finances";

 

$dir=opendir($file_dir);

while ($file=readdir($dir))

{

if ($file != "." && $file != "..")

{

echo "<option value=".$file_dir."/".$file." target=_blank>".$file."</a></option>";

echo "<br>";

}

}

 

?>

 

    </select> 

<input type="button" onClick="document.location = document.htmlMenu.htmlSelList.options [document.htmlMenu.htmlSelList.selectedIndex].value;"

value="GO">

</form>

 

Anyone know how?

 

Cheers

Link to comment
https://forums.phpfreaks.com/topic/82495-solved-open-in-new-window/
Share on other sites

Sorry I wasn't clear enough..

 

<form name="htmlMenu">
    <select name="htmlSelList" size="1">

<?

$file_dir="./Directors/Finances";

$dir=opendir($file_dir);
   while ($file=readdir($dir))
   {
      if ($file != "." && $file != "..")
      {
         echo "<option value=".$file_dir."/".$file." target=_blank>".$file."[/url]</option>";
         echo "
";
      }
   }

?>

    </select> 
<input type="button" onClick="window.open(document.htmlMenu.htmlSelList.options [document.htmlMenu.htmlSelList.selectedIndex].value);"
value="GO">
</form>

 

Try that!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.