Link to home
Start Free TrialLog in
Avatar of yammanur
yammanur

asked on

HTML Question

How to use the Hidden Type in HTML Forms ??
How to retrive the value in the Hidden Type ??
Avatar of andreif
andreif
Flag of Canada image

You can add hidden fields to HTML forms:
<input name=field_name type=hidden value=some_value>

it works like an usual text input with one difference: it's hidden and user can't change the value.

With the best regards,
andreif
Avatar of drom
drom

there is no difference between type="hidden" and type="text" of INPUT tag besides user interaction. usage, retrieving with scripts, get or post are the same.
or what do you have in mind?
here goes an example:

<form name="myform" ...>
<input type="hidden" name="myfield" value="hi there">

to retriebe the value via javascript do this:

<script language="javascript">
<!--
myvalue = document.myform.myfield.value
alert(myvalue)
//-->
</script>

xabi
ASKER CERTIFIED SOLUTION
Avatar of man068
man068

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial