File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Joined: Dec 14, 2009
Dec 20, 2010 20:09:08
I need to understand with hidden fields.
I am assigning hidden field
<input type="hidden" name="minAmt" value="minAmt">
I have written set and get methods in form.
I have set its value in the action class in default mode which is it gets loaded initially. Now when i press a button its should check this value so I am trying to call hidden field value
I am getting null value.. please help me.
Joined: May 02, 2010
Dec 20, 2010 20:40:59
Get hidden field value using formName.
<form id="myFormId" name="myFormName"> <input id="hiddenFiledId" type="hidden" name="minAmt" value="minAmt"> </form>
var value1 = document.getElementById('hiddenFiledId').value; //or var value2 = document.myFormName.minAmt.value; //or var value3 = document.myFormName.hiddenFiledId.value;
Wake up! Don't let your smile be snatched away by anybody!
Author and ninkuma
Joined: Jan 10, 2002
Dec 20, 2010 21:24:34
It has nothing at all to do with the fact the field is hidden. Use
addressing mechanisms such as
Asking smart questions
Books by Bear
I agree. Here's the link:
subject: Hidden fields
how to set value of text field
Action resubmitted with browser's back button
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015