Hello again,

I want to use a dynamic form using template, but I need some help with the onchange attribute. Here an example of what I want to do:

Code:
<html> 
<head> 
<script language="javascript"> 
function setOptions(o) 
{ 
var select2 = document.form1.select2; 
select2.options.length = 0; 
if (o == "1") 
{ 
select2.options[select2.options.length] = new Option('Apple'); 
select2.options[select2.options.length] = new Option('Pear'); 
} 
if (o == "2") 
{ 
select2.options[select2.options.length] = new Option('Carrot'); 
select2.options[select2.options.length] = new Option('Potatoe'); 
} 
if (o == "3") 
{ 
select2.options[select2.options.length] = new Option('Chicken'); 
select2.options[select2.options.length] = new Option('Fish'); 
} 
} 
</script> 
</head> 
<body> 
<form name="form1"> 
<select name="select1" size="1" onchange="setOptions(document.form1.select1.options[document.form1.select1.selectedIndex].value);"> 
<option value="1">Fruit</option> 
<option value="2">Vegetable</option> 
<option value="3">Meat</option> 
</select> 
<br /> 
<br /> 
<select name="select2" size="1"> 
<option>Apple</option> 
<option>Pear</option> 
</select> 
</form> 
</body> 
</html>
This is possible on zimbra, if so, how can I make it work? Can I make something similar without template?