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,resto re){
eval(targ+".location='"+se lObj.optio ns[selObj. selectedIn dex].value +"'");
if (restore) selObj.selectedIndex=0;
}
//--></Script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>bsd_select.php</tit le>
</head>
<body>
<form>
Search the Database <br>
<select style="width:125px" name="menu1" onChange="jumpMenu('parent .mainFrame ',this,0)" ><option>M ake 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['ministrie s']." 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_direct ory']." ORDER BY action_name ASC") or die("Sql error : " . mysql_error());
while ($row = mysql_fetch_array($result) ) {
echo "<option value=\"{$row['directory_l ink']}?id= {$row['jz_ directoryI D']}\">".$ row["actio n_name"]." </option>\ n";
}
?>
</select>
</form>
<?php
?>
</body>
</html>
Thanks
Michael
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,resto
eval(targ+".location='"+se
if (restore) selObj.selectedIndex=0;
}
//--></Script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>bsd_select.php</tit
</head>
<body>
<form>
Search the Database <br>
<select style="width:125px" name="menu1" onChange="jumpMenu('parent
<?php
$include_path = "";
require_once($include_path
require_once($include_path
$i=0;
$j=0;
// $result = mysql_query("SELECT DISTINCT ministryID, ministry_name, ministry_link FROM ".$myconfig->dt['ministrie
$result = mysql_query("SELECT DISTINCT jz_directoryID, action_name, directory_link FROM ".$myconfig->dt['jz_direct
while ($row = mysql_fetch_array($result)
echo "<option value=\"{$row['directory_l
}
?>
</select>
</form>
<?php
?>
</body>
</html>
Thanks
Michael
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Michael