please dont rip this site

JavaScript: The Definitive Guide

Previous Chapter 21
JavaScript Reference
Next
 

Hidden Element

Name

Hidden Element---hidden data for client/server communication

Availability

Navigator 2.0, Internet Explorer 3.0; enhanced in Navigator 3.0

Synopsis

form.name
form.elements[i]

Properties

form

A read-only reference to the Form object that contains the Hidden element.

name

A read-only string, set by the HTML NAME attribute, that specifies the name of the Hidden element. This is also the name that can be used to reference the Hidden element as a property of its form.

type

A read-only string that specifies the type of this form element. For Hidden elements, it has the value "hidden." Available in Navigator 3.0 and later.

value

A read/write string, initially set by the HTML VALUE attribute, which specifies arbitrary data to be transmitted to the server when the form is submitted. This data is never visible to the user.

HTML Syntax

A Hidden element is created with a standard HTML <INPUT> tag:

<FORM>
    ...
  <INPUT
    TYPE="hidden"   specifies that this is a Hidden element
    [ NAME="name" ]   a name that can later be used to refer to this element
    specifies the name property
    [ VALUE="value" ] the value transmitted when the form is submitted
    specifies the initial value of the value property
  >
    ...
</FORM>

Description

The Hidden element is an invisible form element that allows arbitrary data to be transmitted to the server when the form is submitted. You can use a Hidden element when you want to transmit additional information, besides the user's input data, to the server.

When an HTML document is generated on-the-fly by a server, another use of Hidden form elements is to transmit data from the server to the client for later processing by JavaScript on the user's side. For example, the server might transmit raw data to the client in a compact machine readable form by specifying the data in the VALUE attribute of a Hidden element or elements. On the client side, a JavaScript program (transmitted along with the data or in another frame) could read the value property of the Hidden element or elements and process, format, and display that data in a less compact human-readable (and perhaps user-configurable) format.

Hidden elements can also be useful for communication between CGI scripts, even without the intervention of JavaScript on the client side. In this usage, one CGI script generates a dynamic HTML page containing hidden data, which is then submitted back to a second CGI script. This hidden data can communicate state information, such as the results of submission of a previous form.

Usage

Cookies can also be used to transmit data from client to server. An important difference between hidden form elements and cookies, however, is that cookies are persistent on the client side.

See Also

"Element", "Form", "Document.cookie"


Previous Home Next
getClass() Book Index Hidden.form

HTML: The Definitive Guide CGI Programming JavaScript: The Definitive Guide Programming Perl WebMaster in a Nutshell

file: /Techref/language/java/script/definitive/refp_149.htm, 7KB, , updated: 2019/10/14 16:00, local time: 2024/4/28 02:58,
TOP NEW HELP FIND: 
3.140.185.123:LOG IN

 ©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF="http://www.massmind.org/techref/language/java/script/definitive/refp_149.htm"> [Chapter 21] Reference: Hidden</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.


Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

 

Welcome to massmind.org!

 

Welcome to www.massmind.org!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .