Hello,
I have a form and the parameter names are generated automatically... that is to say I don't really know the parameter names (Those are in fact attributes read from a list).
In the form I am building, the user can:
- modify only one parameter (submit goes to pp1.jsp). Each parameter has a submit button associated to it.
- modify all the parameter (submit goes to pp2.jsp)
In order to do this I use a javascript function called reDirect. if "0" is passed, the file is forwarded to pp1.jsp
if "1" is passed, the file is forwarded to pp2.jsp
My question is: When I submit the file to pp1.jsp (That is to say that the user only wants to modify only one specific parameter) How can I read the parameter name.....I can't do a getParameter(<param_name>) since I don't know the name!!!
Help me please!!
THank you
I generate the form the following way:
<form .... name="attributes" ...>
<table>
<tbody>
<tr>
<%
for (int i=1; i < ainfo1.length; i++)
{
name=ainfo1.getName();
value = mbsc.getAttribute(mbeanName1,ainfo1.getName();
%>
<td><%=name%>: </td>
<td><input type=text name=<%=name%> value=<%=value%>></td>
<td><input type="button" onClick="reDirect(0)" value="M"></td>
<%
}
%>
</td>
</tr>
<%
}
%>
</tbody>
</table>
<input type="button" onClick="reDirect(1)" value="All"> </form>
I have a form and the parameter names are generated automatically... that is to say I don't really know the parameter names (Those are in fact attributes read from a list).
In the form I am building, the user can:
- modify only one parameter (submit goes to pp1.jsp). Each parameter has a submit button associated to it.
- modify all the parameter (submit goes to pp2.jsp)
In order to do this I use a javascript function called reDirect. if "0" is passed, the file is forwarded to pp1.jsp
if "1" is passed, the file is forwarded to pp2.jsp
My question is: When I submit the file to pp1.jsp (That is to say that the user only wants to modify only one specific parameter) How can I read the parameter name.....I can't do a getParameter(<param_name>) since I don't know the name!!!
Help me please!!
THank you
I generate the form the following way:
<form .... name="attributes" ...>
<table>
<tbody>
<tr>
<%
for (int i=1; i < ainfo1.length; i++)
{
name=ainfo1.getName();
value = mbsc.getAttribute(mbeanName1,ainfo1.getName();
%>
<td><%=name%>: </td>
<td><input type=text name=<%=name%> value=<%=value%>></td>
<td><input type="button" onClick="reDirect(0)" value="M"></td>
<%
}
%>
</td>
</tr>
<%
}
%>
</tbody>
</table>
<input type="button" onClick="reDirect(1)" value="All"> </form>