Reputation: 70
(HtmlUnit/Java/NetBeans 7.3)
How do you set the value for hidden inputs inside a form. I have a form, an it has the hiddens. No need to add hiddens.
I have the values and I just need to set those inputs with such values.
Thanks everyone!
HTML code
<tr id="theRowprof_1_54066" style="display:table-row;">
<td valign="top">
<input type="text" readonly="" onclick="buscaProf('79FA9300D2DC4BDE');" value="STAFF" size="6" name="p_profesor_1_54066">
<input type="hidden" value="" name="p_profesor_pidm_1_54066">
<input type="hidden" value="100" name="p_responsabilidad_1_54066">
</td>
</tr>
Upvotes: 3
Views: 2703
Reputation: 4923
You have not provided the source code so i m providing the code assuming that hidden input contain ID attribute.
HtmlHiddenInput hidden = (HtmlHiddenInput) page.getElementById("Hidden_Id");
hidden.setValueAttribute("Updated_Value");
Upvotes: 3