ACTION Attribute | action Property

MS Office DHTML, HTML & CSS

ACTION Attribute | action Property


Sets or retrieves the URL to which the FORM content is to be sent for processing.

Syntax

HTML<FORM ACTION = sURL ... >
Scriptingform.action [ = sURL]

Possible Values

sURLString that specifies the URL to be used. If a relative path is specified, the base URL of the document is assumed.

The property is read/write with no default value.

Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see dynamic propertiesInternet Link.

Remarks

The way the data is submitted depends on the value of the method and encoding properties.

Example

This example uses the ACTION attribute to post a form to a specified URL.

Sample Code

<HTML>
   <FORM ACTION="http://example.microsoft.com/sample.asp" 
      METHOD="POST">
      Enter your name: <INPUT NAME="FName"><BR>
      Favorite Ice Cream Flavor:
      <SELECT NAME="Flavor">
         <OPTION VALUE="Chocolate">Chocolate
         <OPTION VALUE="Strawberry">Strawberry
         <OPTION VALUE="Vanilla" SELECTED>Vanilla
      </SELECT>
      <P><INPUT TYPE=SUBMIT>
   </FORM>
</HTML>

This example uses the ACTION attribute to specify a URL for the mailto protocolInternet Link.

Sample Code

<form ACTION="mailto:[email protected]" method=GET>
  <input name=subject type=hidden 
     value="Widget%20Product%20Information%20Request">
  Enter your full mailing address<BR>
  <TextArea name=body cols=40></textarea>
  <input type=submit value="Send Request"
</form>

Applies To

[ Object Name ]
PlatformVersion
Win16:
Win32:
Mac:
Unix:
WinCE:
Version data is listed when the mouse hovers over a link, or the link has focus.

FORM


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? write us!Internet Link

© 1999 microsoft corporation. all rights reserved. terms of useInternet Link.