PDA

View Full Version : coming out


defmars
10-28-2005, 11:38 PM
I'm using a php script to save change made on a XML file, while the script works, but while I do not expect any response from the server, a new blank browser is opened every time the php script is called. Here's my actionscript :
myLast = new LoadVars();
myLast.myxml = myXML;
myLast.myout = "XMLcheck.xml";
myLast.send("savingXML.php","POST");

and here's my php script :

<html>
<body>
<?php
$a = $_POST['myout'];
$postdata = stripslashes($_POST['myxml']);
$fp=fopen($a,"w+");
fwrite($fp, $postdata);
fclose($fp);
?>
</body>
</html>


If I don't use "POST" in my actionscript, the node is not saved. Why is server responding when I do not ask it to ?

CyanBlue
10-29-2005, 01:21 AM
Howdy... :)

If your question is how you can hide the window, use sendAndLoad() function instead of send() function...
myLast.sendAndLoad("savingXML.php", myLast, "POST");

defmars
10-29-2005, 08:11 AM
works like a charm. thanks.