
LoadVars.sendAndLoad() Method
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
Alphabetical Language Reference
|
587
Bugs
Macromedia’s documentation states that when the target parameter is not specified, the
script at
url is executed, but the results are discarded. However, in Flash Player 6, tests
show that when
target is not specified, the send( ) the method fails to execute the script at
url.
Example
The following code uses a LoadVars object to send the properties name and age as URL-
encoded variables to the script userFind.pl:
// Create the LoadVars object
varSender = new LoadVars();
// Assign properties to the varSender object
// These are the variables sent to the server
varSender.name = "Bruce";
varSender.age = "13";
// Send variables to server, and catch reply in a new browser window
varSender.send("http://www.someserver.com/cgi-bin/userFind.pl", "_blank", "GET");
See Also
getURL( ), LoadVars.onLoad( ), LoadVars.sendAndLoad( ), LoadVars.toString( )
LoadVars.sendAndLoad() Method
transfer variables to a server-side application and receive variables in return
Flash 6
loadVarsObject.sendAndLoad(url, targetObject)
loadVarsObject.sendAndLoad(url, targetObject, method)
Arguments
url A string specifying the absolute or relative location of the external script or
application that receives the Flash variables.
targetObject A reference to the LoadVars ...