Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Javascript value to hidden itterated HTML field

843836Jan 17 2005 — edited Feb 11 2005
How can I write a javascript variable to a hidden input field in a struts page where the hidden field is part of an object in an ArrayList that is shown using logic iterate tag?

My Struts code is:

<logic:iterate name="ManageEntryPointForm" property="entrypoints" id="list" type="org.oclc.da.ndiipp.struts.domain.util.EntryPointBean" indexId="ii" >
<% String changeCommand = "setChangeFlag('" + ii + "')"; %>
<tr><html:hidden name="list" indexed="true" property="changeFlag" />
<logic:equal name="ManageEntryPointForm" property="editToken" value="Yes" >
<td><html:radio name="list" indexed="true" property="include" value="true" onchange="<%=changeCommand%>" /></td>
<td><html:radio name="list" indexed="true" property="include" value="false" onchange="<%=changeCommand%>" /></td>
</logic:equal>
</tr>
</logic:iterate>

and my current javascript is:

function setChangeFlag(recNum)
{
alert("Record number " + recNum + " has been changed.");
document.ManageEntryPointForm.list[recNum].changeFlag="true";
alert("Record number " + recNum + " has been changed.");
}

This isn't working...

Help Please!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 11 2005
Added on Jan 17 2005
4 comments
308 views