commandButton's action doesn't work
Hi,All
Once I click on select list box control, commandButton's action doesn't work.
if I doesn't click on list box, commandButton's action work well.
what make this problem?
<!--page-->
<%@ page contentType="text/html;charset=GBK"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<%
response.setHeader("Cache-Control", "no-cache");
%>
<html>
<head>
<title>Insert title here</title>
<link href="info2007.css" rel="stylesheet" type="text/css" />
<script language="javascript">
function clickSelect(){
var selObj = document.getElementById("org_rank:childOrgs");
var index = selObj.selectedIndex;
document.forms['org_rank']['org_rank:curValue'].value = index;
}
</script>
</head>
<f:view>
<body>
<h:form id="org_rank">
<h:inputHidden id="parentid" value="#{orgDelegate.parentid}" />
<h:inputHidden id="curValue" value="#{orgDelegate.curValue}" />
<table align="center" border="1" cellpadding="0" cellspacing="0">
<tr>
<td align="middle" heigth="100" width="160">
<h:selectOneListbox id="childOrgs" style="height:100px;width:150px" value="92" onchange="clickSelect()">
<f:selectItems id="orgNames" value="#{orgDelegate.orgNames}" />
</h:selectOneListbox>
</td>
<td align="middle" width="80">
<h:commandButton value="down" action="#{orgDelegate.movedown}" alt="down" />
<h:commandButton value="up" action="#{orgDelegate.moveup}" alt="up"/>
</td>
</tr>
</table>
</h:form>
</body>
</f:view>
</html>

