1 Reply Latest reply on Nov 8, 2006 8:23 AM by jonnybennett

    why does .send action open the target asp?

    rohai Level 1
      Hmm,...
      I believe this is causing the problem. When this function is called, it should send variables to asp and open a new swf. But instead it opens asp page in a new window and the loaded swf doesn't receive the data. Any ideas?
      THX

      Here's the code:

      program = function(){
      movie = this.swf;
      id = this.query;
      var sendProgram = new LoadVars();
      sendProgram.scene = movie;
      sendProgram.programID = id;
      sendProgram.send("actions1.asp","POST");
      home_mc._visible = false;
      main_mc._visible = true;
      mcLoader.loadClip("program.swf", main_mc);
      trace(id);
      trace(movie);
      trace(sendProgram);
      };
        • 1. Re: why does .send action open the target asp?
          jonnybennett Level 1
          Use sendAndLoad instead.

          sendProgram.sendAndLoad("actions1.asp",sendProgram,"POST");

          this also means that if you want something else to happen once the data has been sent you can add another loadVars eg.

          recievedProgram=new LoadVars();

          sendProgram.sendAndLoad("actions1.asp",recievedProgram,"POST");

          recievedProgram.onLoad=function(){
          trace('my data has been sent and this has loaded');}

          Hope this helps. J.