I have following code with drop-list name "agencyName". But event
.change() attached to this object never called. So i was wondering does
jQuery ever work with Struts custom tag? or Am I doing something wrong?
Thanks in advance.
Anjib
<script type="text/javascript" src="js/jquery.js"></script>
<script>
$('#agencyName').change( function() {
/* Never called here */
alert($('select#agencyName').val());
$.ajax({
url: "getGroupList.do",
data: "agencyName=" + $('select#agencyName').val()
})
} );
</script>
<div id="topOptions">
<table>
<tr valign="top">
<td width="49%">
<html:form action="/addUserToAgencyAndGroup" styleId="addBulkEmail">
<h1><bean:message key="title.addToAgency" /></h1>
<label for="agencyName" class="formLabel">
<bean:message key="common.organizationalUnit" />
</label>
<html:select title="Agency Name" styleId="agencyName"
property="agencyName" tabindex="1">
<% ArrayList<String> agencyList = new ArrayList<String>();
agencyList = (ArrayList<String>)
request.getAttribute("agencyList");
for (int i = 0; i < agencyList.size(); i++) {%>
<html:option value='<%= agencyList.get(i)%>'/>
<% }%>
</html:select>
<label for="groupName" class="formLabel">
<bean:message key="common.group" />
</label>
<html:select title="Group" styleId="groupName" property="groupName"
tabindex="2">
</html:select><br/>
<label for="bulkEmail">
<bean:message key="option2.msg" />
</label>
<html:textarea cols="70" rows="5" property="emails" styleId="emails"
value="" /><br/>
<input title="Add Emails" type="submit" value="Add All" />
</html:form>
</td>
</tr>
</table>
</div>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org