KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > w3c > dom > html2 > HTMLFormElement


1 /*
2     GNU LESSER GENERAL PUBLIC LICENSE
3     Copyright (C) 2006 The Lobo Project
4
5     This library is free software; you can redistribute it and/or
6     modify it under the terms of the GNU Lesser General Public
7     License as published by the Free Software Foundation; either
8     version 2.1 of the License, or (at your option) any later version.
9
10     This library is distributed in the hope that it will be useful,
11     but WITHOUT ANY WARRANTY; without even the implied warranty of
12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13     Lesser General Public License for more details.
14
15     You should have received a copy of the GNU Lesser General Public
16     License along with this library; if not, write to the Free Software
17     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18
19     Contact info: xamjadmin@users.sourceforge.net
20 */

21 /*
22  * Copyright (c) 2003 World Wide Web Consortium,
23  * (Massachusetts Institute of Technology, Institut National de
24  * Recherche en Informatique et en Automatique, Keio University). All
25  * Rights Reserved. This program is distributed under the W3C's Software
26  * Intellectual Property License. This program is distributed in the
27  * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
28  * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
29  * PURPOSE.
30  * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
31  */

32
33 package org.w3c.dom.html2;
34
35 /**
36  * The <code>FORM</code> element encompasses behavior similar to a collection
37  * and an element. It provides direct access to the contained form controls
38  * as well as the attributes of the form element. See the FORM element
39  * definition in HTML 4.01.
40  * <p>See also the <a HREF='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
41  */

42 public interface HTMLFormElement extends HTMLElement {
43     /**
44      * Returns a collection of all form control elements in the form.
45      */

46     public HTMLCollection getElements();
47
48     /**
49      * The number of form controls in the form.
50      */

51     public int getLength();
52
53     /**
54      * Names the form.
55      */

56     public String JavaDoc getName();
57     /**
58      * Names the form.
59      */

60     public void setName(String JavaDoc name);
61
62     /**
63      * List of character sets supported by the server. See the accept-charset
64      * attribute definition in HTML 4.01.
65      */

66     public String JavaDoc getAcceptCharset();
67     /**
68      * List of character sets supported by the server. See the accept-charset
69      * attribute definition in HTML 4.01.
70      */

71     public void setAcceptCharset(String JavaDoc acceptCharset);
72
73     /**
74      * Server-side form handler. See the action attribute definition in HTML
75      * 4.01.
76      */

77     public String JavaDoc getAction();
78     /**
79      * Server-side form handler. See the action attribute definition in HTML
80      * 4.01.
81      */

82     public void setAction(String JavaDoc action);
83
84     /**
85      * The content type of the submitted form, generally
86      * "application/x-www-form-urlencoded". See the enctype attribute
87      * definition in HTML 4.01. The onsubmit even handler is not guaranteed
88      * to be triggered when invoking this method. The behavior is
89      * inconsistent for historical reasons and authors should not rely on a
90      * particular one.
91      */

92     public String JavaDoc getEnctype();
93     /**
94      * The content type of the submitted form, generally
95      * "application/x-www-form-urlencoded". See the enctype attribute
96      * definition in HTML 4.01. The onsubmit even handler is not guaranteed
97      * to be triggered when invoking this method. The behavior is
98      * inconsistent for historical reasons and authors should not rely on a
99      * particular one.
100      */

101     public void setEnctype(String JavaDoc enctype);
102
103     /**
104      * HTTP method [<a HREF='http://www.ietf.org/rfc/rfc2616.txt'>IETF RFC 2616</a>] used to submit form. See the method attribute definition
105      * in HTML 4.01.
106      */

107     public String JavaDoc getMethod();
108     /**
109      * HTTP method [<a HREF='http://www.ietf.org/rfc/rfc2616.txt'>IETF RFC 2616</a>] used to submit form. See the method attribute definition
110      * in HTML 4.01.
111      */

112     public void setMethod(String JavaDoc method);
113
114     /**
115      * Frame to render the resource in. See the target attribute definition in
116      * HTML 4.01.
117      */

118     public String JavaDoc getTarget();
119     /**
120      * Frame to render the resource in. See the target attribute definition in
121      * HTML 4.01.
122      */

123     public void setTarget(String JavaDoc target);
124
125     /**
126      * Submits the form. It performs the same action as a submit button.
127      */

128     public void submit();
129
130     /**
131      * Restores a form element's default values. It performs the same action
132      * as a reset button.
133      */

134     public void reset();
135
136 }
137
Popular Tags