Password Object

By: aathishankaran  

As you can tell from its name, the password object has but a single purpose: to capture a pass-word value from a user. A password object is similar to a text object but displays any character the user types in the field as an asterisk (*).

It can be defined in HTML syntax as

 <INPUT TYPE="password" [NAME=" objectName"] [VALUE=" defaul tPassword"]


 The following line shows an example:

 <INPUT TYPE="password" NAME="passwordField" SIZE=15>

JavaScript has little control over the password object. For examp1e, you cannot retrieve the value of the text entered by the user to evaluate it; you can only retrieve default text that has been defined using the VALUE= parameter of the

<INPUT type=password> tag. Part of the reason JavaScript cannot access this is that JavaScript code is currently embedded into the HTML document so the user could access it. As JavaScript matures, it might get more control over this form object.

Hidden Object 

As one might infer from its name, a hidden object is invisible to the user. The hidden object is a hidden text field that you can use to store values that you do not want to present to the user with a normal text field. You can then pass this information to the server for processing. You can define a hidden object in HTML using the following syntax: 

<INPUT TYPE="hidden" NAME="objectName" [VALUE="value"]>

 The following line shows an example:

 <INPUT TYPE="hidden" NAME="hiddenField1">

 Events are not handled for Password Object and Hidden Object


Archived Comments

Most Viewed Articles (in JSP )

Latest Articles (in JSP)

Comment on this tutorial