action Attribute


 

Where to use the action Attribute

  • As Type URI - #REQUIRED:
    action is declared on the element: form

Description

The action attribute is a #REQUIRED attribute which specifies the URI of the processing agent to which form data will be sent on submission. Relative URIs are resolved with respect to the base URI of the document (see the base element). User agent behaviour for a value other than a URI is undefined (see - for HTML4 - *HTML 4 - The FORM element).

In most circumstances, if the action attribute is given an empty string "" as its value, the form is submitted to the URI of the document containing the form. However:

Caveat: Do not use a blank action attribute when the base URI for the document is different to the URI of the document itself (e.g. it has been set to a different location using the base element). If this is the case, some user agents will send forms with a blank action attribute to the URI of the document itself and some will send them to the explicit base URI instead. Of the three browsers I currently have installed on my linux box, two do the former (Firefox 2 and Opera 9) and one does the latter (Konqueror 3.5.4).


Page Footer & Copyright

Copyright © Sally Maughan 2005-2009 (Page last updated on 16 May 2009)

*Valid XHTML 1.1 - hosted by *Openstrike

Content based on the W3C Working Draft: *XHTML 1.1 and Recommendation: *XHTML Modularisation 1.1.

W3C, XHTML, XML, HTML, CSS and MathML are *Trademarks of the W3C (*MIT, *ERCIM, *Keio) with which the site's author has no connection.


Up, Next & Previous Links

Your Location

Home > XHTML 1.1 Home > XHTML 1.1 Indexes > Attribute Index (XHTML 1.1) > action Attribute (XHTML 1.1)