Link to home
Start Free TrialLog in
Avatar of mhoggatt1
mhoggatt1

asked on

Java code modify

The Java code below was originally used with frames. The dropdown menu in the left frame changed the page in the right frame. I need to modify the Java code so that when a slection is made from the menu it displys the page on the same page. I believe mainFrame is what needs to be changed.
Here is the code -

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<Script language="JavaScript"><!--
function jumpMenu(targ,selObj,restore){
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//--></Script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>bsd_select.php</title>
</head>
<body>
<form>
    Search the Database <br>
    <select style="width:125px" name="menu1" onChange="jumpMenu('parent.mainFrame',this,0)"><option>Make a Selection</option>
    <?php
      $include_path = "";
      require_once($include_path. 'uis.php');
      require_once($include_path. 'myconfig.php');

     $i=0;
     $j=0;

// $result = mysql_query("SELECT DISTINCT ministryID, ministry_name, ministry_link FROM ".$myconfig->dt['ministries']." ORDER BY ministry_name ASC") or die("Sql error : " . mysql_error());
$result = mysql_query("SELECT DISTINCT jz_directoryID, action_name, directory_link FROM ".$myconfig->dt['jz_directory']." ORDER BY action_name ASC") or die("Sql error : " . mysql_error());

while ($row = mysql_fetch_array($result)) {
echo "<option value=\"{$row['directory_link']}?id={$row['jz_directoryID']}\">".$row["action_name"]."</option>\n";
     }

?>
    </select>
</form>

<?php
?>
</body>
</html>

Thanks
Michael
ASKER CERTIFIED SOLUTION
Avatar of hielo
hielo
Flag of Wallis and Futuna image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mhoggatt1
mhoggatt1

ASKER

Here you go, thanks again.
Michael