Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Probably an EASY question about forms...

Status
Not open for further replies.

jmk2z

Programmer
Oct 29, 2002
18
US
What are the possible values for the "type" attribute in a form?
 
You mean for the input tags?
Here are some
text | password | checkbox | radio | submit | reset | file | hidden | image | button
You also have textarea and select
 
button Creates a button control.
checkbox Creates a checkbox for simple Boolean attributes or for attributes that can take multiple values at the same time. The input consists of a number of check box controls, each of which has the same name. Each selected check box generates a separate name/value pair in the submitted data, even if this results in duplicate names. The default value is on.
file Creates a file upload object.
hidden Creates a control hidden from the user, but the value of the value property is sent with the submitted form.
image Creates an image control that can be clicked, causing the form to be immediately submitted. The coordinates of the selected point are measured in pixels from the upper-left corner of the image and are submitted with the form as two name/value pairs. The x-coordinate is submitted under the name of the control with .x appended, and the y-coordinate is submitted under the name of the control with .y appended. Any value property is ignored. The image is specified by the src property, exactly as for the img object
password Creates a control similar to the text control, except that text is not displayed as the user enters it.
radio Creates radio buttons used for mutually exclusive sets of values. Each radio button control in the group should be given the same name. Only the selected radio button in the group generates a name/value pair in the submitted data. Radio buttons require an explicit value property.
reset Creates a button that resets the form's controls to their specified initial values. You can specify the label to display on this button just as you can for the Submit button.
submit Creates a button that submits the form. Use the VALUE attribute to specify a label that is displayed on the button. The default label is application-specific. When the button is clicked, the associated control objects submit name/value pairs to the server.
text Default. Creates a single-line text-entry control. Use the value in conjunction with the size and maxLength properties.


The property is read/write. The property has a default value of text.
"did you just say Minkey?, yes that's what I said."

MrGreed
 
No, I mean for the actual form.

Example:
<form name=&quot;form1&quot; type=&quot;&quot;...
 
Sorry, I'm not aware of a type attribute in a form tag.
 
Form Tag doesn't have a 'type' attribute. &quot;did you just say Minkey?, yes that's what I said.&quot;

MrGreed
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top