mastahkaz
11-12-2002, 07:40 PM
OK, i need each select item to run a differnt javascript when selected. Here's what i used:
<html>
<head>
<script language="JavaScript">
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].name+"'");
if (restore) selObj.selectedIndex=0;
}
</script>
</head>
<body>
<select name="txtCapacity" onChange="MM_jumpMenu('self',this,0);">
<option selected value="0" name="#" >Select a lawn type ---></option>
<option value="890" id="single" name="javascript:fillList(0);">Single</option>
<option value="885" id="sing_sec" name="javascript:fillList(1);">Single & 2nd Right</option>
<option value="1730" id="second" name="javascript:fillList(2);">2nd Right Only *</option>
</select>
</body>
</html>
So what happens is when they pick one of those 3 options the javascript for that selection will kick in. Now it works fine, except in NS 6 & 7, after the javascript does its thing, it forwards to a non existant html page called ../undefined.
Anyone know how i can get this to work correctly in netscape?
<html>
<head>
<script language="JavaScript">
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].name+"'");
if (restore) selObj.selectedIndex=0;
}
</script>
</head>
<body>
<select name="txtCapacity" onChange="MM_jumpMenu('self',this,0);">
<option selected value="0" name="#" >Select a lawn type ---></option>
<option value="890" id="single" name="javascript:fillList(0);">Single</option>
<option value="885" id="sing_sec" name="javascript:fillList(1);">Single & 2nd Right</option>
<option value="1730" id="second" name="javascript:fillList(2);">2nd Right Only *</option>
</select>
</body>
</html>
So what happens is when they pick one of those 3 options the javascript for that selection will kick in. Now it works fine, except in NS 6 & 7, after the javascript does its thing, it forwards to a non existant html page called ../undefined.
Anyone know how i can get this to work correctly in netscape?