Facing a unusual challenge :
//Code
<logic:iterate id="list" name="accountRouteConfigListForm" property="valueList" indexId="incr">
<div <custom:align defaultAlign="left"/>>
<html:select name="list" property="accountStatus" onchange="onChangeStatus(${list.accName})"> //This is not working, how to refer accName in list
<html:option value="<%= String.valueOf(Constants.ENABLED) %>">
</html:option>
<html:option value="<%= String.valueOf(Constants.DISABLED) %>">
</html:option>
How do i refer a field inside a list and pass it as an argument to onChangeStatus
First, it seems you are missing an end tag for
<logic:iterate>
in your example code.Second, unless you have a very good reason, try to use JSTL instead of the outdated struts custom tags. It's always good to stay with standards, right?
In your case, that would look like this: