how to call a javascript function using html select onchange in
struts?
eg;
<html:html>
<head>
<script>
function fun1()
{
var id=document.getElementById("category").value
if (id != 0)
{
alert("Please Select a Subcategory");
document.form.id.focus();
return false
}
}</script>
</head>
<body>
<html:from action="/set.do" >
<html:select property="name" onchange="javascript:func()"/>
</html:form>
</body>
</html:html>
I am using Struts 1.2.9 so I cant put the name attribute in form.Pliz help me.