ok heres the code:
This is the source code for my page AFTER php has done its thing. ie the way the browser see it.
<html>
<head><title>LYRIT -Add Module</title></head>
<body bgcolor=#ffffff>
<script LANGUAGE="JavaScript">
<!--
var supported = (window.Option) ? 1 : 0;
if (supported) {
var active;
var ar = new Array();
ar[0] = new Array();
ar[0][0] = new makeOption("");
ar[1] = new Array();
ar[1][0] = new makeOption("ES-ANSC-M1");
ar[1][1] = new makeOption("ES-TEST");
ar[1][2] = new makeOption("PP1");
ar[1][3] = new makeOption("PP2");
ar[2] = new Array();
ar[2][0] = new makeOption("PP2");
ar[3] = new Array();
ar[3][0] = new makeOption("PP1");
ar[3][1] = new makeOption("PP2");
ar[4] = new Array();
ar[4][0] = new makeOption("mail.inscc");
ar[4][1] = new makeOption("mrelay.inscc");
ar[4][2] = new makeOption("PP1");
ar[5] = new Array();
ar[5][0] = new makeOption("mon.chpc");
ar[5][1] = new makeOption("oreo.chpc");
ar[5][2] = new makeOption("PP1");
ar[5][3] = new makeOption("pseudo.chpc");
ar[6] = new Array();
ar[6][0] = new makeOption("PP1");
}
function makeOption(text, url) {
this.text = text;
this.url = url;
}
function relate(form) {
if (!supported) {
load(form, "whichRack");
return;
}
var options = form.whichMachine.options;
for (var i = options.length - 1; i > 0; i--) {
options = null;
}
var curAr = ar[form.whichRack.selectedIndex];
for (var j = 0; j < curAr.length; j++) {
options[j] = new Option(curAr[j].text, curAr[j].url);
}
options[0].selected = true;
}
// -->
</SCRIPT> <form action="checkmodule.php" method="post">
<table width=350>
<tr>
<td> rack
</td>
<td>
<select NAME="whichRack" onChange="relate(this.form)">
<option></option> <option>CR3-ANSC</option><option>RR1-M1</option><option>RR2-M1</option><option>RR3-M1</option><option>RR4-M1</option><option>RR5-M1</option> </select> </td>
</tr>
<tr>
<td>
machine
</td>
<td> <select NAME="whichMachine">
<option> </option>
</select>
</td>
</tr>
<tr>
<td>
#
</td>
<td>
<input size=5 maxlength=2 name="newModuleNumber"> </td>
</tr>
<tr>
<td valign=top>
descript
This is a sample php script that i set up to test if the variables are passing.
<?
$wRack = $_POST['whichRack'];
$wMachine = $_POST['whichMachine'];
$nmNumber = $_POST['newModuleNumber'];
$nmDesc = $_POST['newModuleDesc'];
echo "rack=$wRack<br>machine=$wMachine<br>modnum=$nmNumber<br>desc=$nmDesc<br>";
?>
as you can see the options under the drop dodown menu 'whichMachine' do not appaer they are controlled soley by javascript. The single blank option that I inserted was add to keep the drop down menu 'long'/'open' and to help solve another problem that I anticipated.
-thanks for all your help