hiddenNN 3   IE 4   DOM 1

The hidden object is a form control generated with an INPUT element whose TYPE attribute is set to "hidden". This element has no event handlers, because users do not interact directly with the element. Be aware that any values assigned to a hidden object are removed if the user reloads the page. In other words, it does not function as a persistent store. The Win32 version of Internet Explorer 4 exposes many more properties than are listed below. Most of these are included in the internal object definition for consistency across other text-oriented form controls, but have no significance for a hidden object.

 
HTML Equivalent
<INPUT TYPE="hidden">
 
Object Model Reference
NN [window.]document.formName.elementName
[window.]document.forms[i].elements[i]
IE [window.]document.formName.elementName
[window.]document.forms[i].elements[i]
[window.]document.all.elementID
dataFld propertyNN n/a   IE 4   DOM n/a
 Read/Write
 

Used with IE 4 data binding to associate a remote data source column name with the element's value. A DATASRC attribute must also be set for the element. Setting both the dataFld and dataSrc properties to empty strings breaks the binding between element and data source.

 
Example
document.all.myObject.dataFld = "price"
 
Value
Case-sensitive identifier of the data source column.
 
Default None.
dataSrcNN n/a   IE 4   DOM n/a
 Read/Write
 

Used with IE 4 data binding to specify the name of the remote ODBC data source (such as an Oracle or SQL Server database) to be associated with the element. Setting both the dataFld and dataSrc properties to empty strings breaks the binding between element and data source.

 
Example
document.all.inventoryTable.dataSrc = "#DBSRC3"
 
Value
Case-sensitive identifier of the data source.
 
Default None.
disabledNN n/a   IE 4   DOM 1
 Read/Write
 

Normally, this property determines whether the element is available for user interaction. Its importance for a hidden element is that when this property is set to true, the element's name/value pair is not submitted with the form.

 
Example
document.forms[0].elements[3].disabled = true
 
Value
Boolean value: true | false.
 
Default false
formNN 2   IE 3   DOM n/a
 Read-only
 

Returns a reference to the FORM element that contains the current element (if any). This property is most often passed as a parameter for an event handler, using the this keyword to refer to the current form control. It has little significance for a hidden form element.

 
Value
Object reference.
 
Default None.
nameNN 2   IE 3   DOM 1
 Read/Write
 

The identifier associated with the form control. The value of this property is submitted as one-half of the name/value pair when the form is submitted to the server. Names are hidden from user view, since control labels are assigned via other means, depending on the control type. Form control names may also be used by script references to the objects.

 
Example
document.orderForm.compName.name = "company"
 
Value
Case-sensitive identifier that follows the rules of identifier naming: it may contain no whitespace, cannot begin with a numeral, and should avoid punctuation except for the underscore character.
 
Default None.
typeNN 3   IE 4   DOM 1
 Read-only
 

Returns the type of form control element. The value is returned in all lowercase letters. It may be necessary to cycle through all form elements in search of specific types to do some processing on (e.g., emptying all form controls of type "text" while leaving other controls untouched).

 
Example
if (document.forms[0].elements[3].type ==  "text") {
    ...
}
 
Value
Any of the following constants (as a string): button | checkbox | file | hidden | image | password | radio | reset | select-multiple | select-one | submit | text | textarea.
 
Default hidden
valueNN 2   IE 3   DOM 1
 Read/Write
 

Current value associated with the form control that is submitted with the name/value pair for the element. All values are strings, but they may represent other kinds of data, including Boolean and numeric values.

 
Example
document.forms[0].price.value = "33.95"
 
Value
String.
 
Default None.