1 Reply Latest reply on Sep 4, 2006 5:59 PM by calmchess333

    flash problem

    calmchess333 Level 1
      I have a flash page which takes a users input and saves it to a .xml file.........There is no problem with writing to the xml file once but if i try to press the submit button the second time i get this error in the input window myTextVar=test&onLoad=%5Btype%20Function%5D
      %3C%3Fphp%0D%0A%24listings%20=%20%24%5FPOST%5B%27myTextVar%27%5D%3B%0D%0A%24toSave%20%3D%2 0%20%22%3C%3Fxml%20version%3D%5C%221%2E0%5C%22%3F%3E%5Cn%20%3Cproducts%3E%5Cn%20%3Citem%3E %5Cn%20%20%24listings%20%20%3C%2Fitem%3E%5Cn%20%3C%2Fproducts%3E%5Cn%22%3B%0D%0A%0D%0A%24f p%20%3D%20fopen%28%22sendsave%2Exml%22%2C%20%22w%22%29%3B%0D%0A%0D%0Aif%20%28fwrite%28%24f p%2C%20%24toSave%29%29%20%7B%0D%0Aecho%20%22writing%3DOk%22%3B%0D%0A%7Delse%20%7B%0D%0Aech o%20%22writing%3DError%22%3B%0D%0A%7D%0D%0Afclose%28%24fp%29%3B%0D%0A%3F%3E%20%0D%0A&myTex tVar=test&onLoad=%5Btype%20Function%5D

      There is a input box a dynamic textfield a xml connector object and a submit button on the stage.

      Here is the flash script which i am using .......
      var dirtyData1 = new LoadVars();
      dirtyData1.onLoad = function(success) {
      if (success) {
      //output loadVars worked
      status.text = "Submited data was saved";
      } else {
      status.text = "Error in saving submitted data";
      submit.onPress = function() {

      dirtyData1.myTextVar = _root.myInput.text;
      dirtyData1.sendAndLoad("sendsave.php", dirtyData1, "POST");

      //this will activate the xml connector componet when the submit button is pressed.


      Could sombody please tell me how i can make it so i can press the submit button more than once?