I tried this if i select abc i should get rrr or if i click wer i should get sky in two list boxes
please help me out
<%@ page import="java.sql.*" %>
<html>
<script >
function fun()
{
f1.Server.length=9;
f1.Server[0].value='abc';
f1.Server[0].innerText='abc';
f1.Server[1].value='wer';
f1.Server[1].innerText='wer';
}
function myCodebaseList()
{
if(f1.Server.value=="abc")
{
f1.Codebase.disabled=false;
f1.Codebase.length=3;
f1.Codebase[0].value="rrr";
f1.Codebase[0].innerText="rrr";
f1.Codebase[0].selected=true;
}
else
if(f1.Server.value=="wer")
{
f1.Codebase.length=4;
f1.Codebase.disabled=false;
f1.Codebase[0].value='[Select One]';
f1.Codebase[0].innerText='[Select One]';
f1.Codebase[0].selected=true;
f1.Codebase[1].value='Sky';
f1.Codebase[1].innerText='Sky';
}
</script>
<body bgcolor=#99CCFF onLoad="fun()">
<form>
Server
<select name=Server id=Server onFocus='myCodebaseList()' style="WIDTH: 140px">
<option value="-" selected>-</option>
</select>
<br>
Codebase
<select name=Codebase id=CodebaseType disabled style="WIDTH: 278px">
<option value="-" selected></option>
</select>
<br>
<tr>
<td>
Build Date: <input type="text" name="build_date" /><br>
Upload : <input type="text" name="upload" /><br>
<input type="submit" value="fupload"/>
<input type="hidden" name="mode" value="save" />
</td>
</tr>
</table>
</form>
</body>
</html>