This site has been taken over by the staff of www.ASPDeveloper.Net

Please report errors to suggest@aspdeveloper.net

BizTalk Utilities CV ,   Jobs ,   Code library  
 
Home Page
XHTML
The XHTML <font_style_tags> Tag
The XHTML <font> Tag
The XHTML <fieldset> Tag
The XHTML <dt> Tag
The XHTML <documenttype> Tag
The XHTML <dl> Tag
The XHTML <div> Tag
The XHTML <dd> Tag
The XHTML <comment> Tag
The XHTML <colgroup> Tag
The XHTML <col> Tag
The XHTML <caption> Tag
The XHTML <button> Tag
The XHTML <br> Tag
The XHTML <body> Tag
The XHTML <blockquote> Tag
The XHTML <bdo> Tag
The XHTML <base> Tag
The XHTML <area> Tag
The XHTML <address> Tag
<< XALAN
XML DOM >>

By :Mark Wilson
I am the creator of TopXML. I am available for international and local (Australia) contracts. I am a Solution Architect/Business Analyst. I have worked in IT in several countries (NZ, Australia, South Africa, UK) building and training teams for government and very large non-governmental organizations. I am ex-Microsoft Consulting Services. I wrote the first book on Microsoft XML published in 2000 called XML Programming with VB and ASP. Most recently I have been building tools for the SEO industry. Ask me for a 37 point SEO health-checkup for your website.
First posted :03/24/2008
Times viewed :4094

 

The <Form> Tag (XHTML Reference)

Introduction

The <form> tag creates a form into the webpage. In the form block the user can fill any textfields, select any data from the drop down list control etc. Once the user has selected/entered the data he wants, he can press the submit button and the data in the form is send. Many things can be done with the data now. You can send the data to another page, which can process it. Usually these are server-side pages like asp, php, asp.net, cgi etc. that can do this. Or you could send the data via an email to somebody else. I am sure that you have seen some shopping carts on the web. Usually when you order something via a shopping cart then you have to press a button for further processing. This all is possible with the form tag.

A form can be used …

  • … to send some data to server
  • … to get some feedback from the reader
  • … to search something in the database
  • … and to do many other things.

Example

<form action="form.html" onSubmit="DisplayValue();">

Enter your name please:<br/>

<input type="textfield" name="UserName">

<input type="submit" value="Send data">

</form>

Output

Attributes

Name:

Description:

action

This contains the url where the data has to be send. You can also use here an email address if you want to send the data via email. For that purpose you have to use the mailto: prefix.
Something like this:

<form action=mailto:name@name.com method=”post”>

accept

List of content-types which the server will accept for file upload.

accept-charset

List of supported character-encodings.

enctype

Specifies the content-type used to submit the form. The default value is:
application/x-www-form-urlencoded

If you are uploading a file, then you have to set this value to: multipart/form-data

method

Specifies which http method is used send the form data. The default value “Get” sends the data with the URL in the following format:

www.mywebsite.com/form.aspx?control1=

value1&control2=value2

The “post” method sends the data in the body of the form and not via the URL.

name

This is just the name of the form. The name can be useful if you are going to retrieve the data via javascript or asp. However it is not necessary.

target

Target Frame to load the page into. Can be one of the following:

_blank = new window
_self = same window

_parent = parent window
_top = url will be opened in full body of the window


Rate this article on a scale of 1 to 10

Your vote :  


 

Recent Jobs

Software Specialist, Linux - Finlan
Linux Core Technical Project Manage
Graphics designer at Tanzania. Expe
Integration Specialist Needed - Wor
Virtualization Server Infrastructur

View all Jobs (Add yours)
View all CV (Add yours)






    Email TopXML  

Front Page Daily Stuff TopXML Forum XML blogs XML Newsgroups BizTalk Biztalk Utilities Biztalk Utilities Tutorial B2B SAP XML Microsoft .NET Dotnet System XML Soapformatter SQLXML XMLserializer XQuery PHP PHP SimpleXML PHP XML Dom PHP XML RPC PHP XSLT Java Java Java XML Xalan Microsoft ASP ASP Schemas XML SQL Server XML XMLDom XSL XSL Tutorial XSLT Stylesheets General Javascript CSS XHTML WAP