var submitListener:Object = new Object();
submitListener.click = function(evt:Object) {
var result_lv:LoadVars = new LoadVars();
result_lv.onLoad = function(success:Boolean) {
if (success) {
result_ta.text = result_lv.welcomeMessage;} else {
result_ta.text = "Error connecting to server.";
}
};
var result_xml:XML = new XML();
result_xml.ignoreWhite = true;
result_xml.onLoad = function(s){
if(s){
result_ta.text = this.firstChild;
}else{
result_ta.text = "Error connecting to server.";
}
}
var send_lv:LoadVars = new LoadVars();
var xm:XML = new XML(""); vinod
xm.ignoreWhite = true;
xm.contentType = "text/xml";
send_lv.xm = xm;
send_lv.sendAndLoad("http://vinodvv/test/sendandloadxml.php", result_lv, "GET");
send_lv.sendAndLoad("http://vinodvv/test/sendandloadxml.php", result_xml, "GET");
};
submit_button.addEventListener("click", submitListener);
PHP Script:
$xml = $_GET['xm'];
echo $xml;
?>
No comments:
Post a Comment