Flash 8 Documentation |
|||
| ActionScript 2.0 Language Reference > ActionScript classes > XML > send (XML.send method) | |||
public send(url:String, [target:String], [method:String]) : Boolean
Encodes the specified XML object into an XML document and sends it to the specified target URL.
When using this method, consider the Flash Player security model:
For more information, see the following:
Availability: ActionScript 1.0; Flash Player 5
url:String - The destination URL for the specified XML object.
target:String [optional] - The browser window to show data that the server returns:
_self specifies the current frame in the current window._blank specifies a new window._parent specifies the parent of the current frame._top specifies the top-level frame in the current window. If you do not specify a target parameter, it is the same as specifying _self.
method:String [optional] - the method of the HTTP protocol used: either "GET" or "POST". In a browser, the default value is "POST". In the Flash test environment, the default value is "GET".
Boolean - false if no parameters are specified, true otherwise.
The following example defines an XML packet and sets the content type for the XML object. The data is then sent to a server and shows a result in a browser window.
var my_xml:XML = new XML("<highscore><name>Ernie</name><score>13045</score></highscore>");
my_xml.contentType = "text/xml";
my_xml.send("http://www.flash-mx.com/mm/highscore.cfm", "_blank");
Press F12 to test this example in a browser.
sendAndLoad (XML.sendAndLoad method)
Version 8
RSS feed | Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/8/main/00002878.html
Comments
No screen name said on Feb 9, 2006 at 5:38 AM :