7 Replies Latest reply on May 4, 2012 5:55 AM by kglad

    Submitting variables to an ASPX file WITHOUT opening new window




      I'm trying to submit some variables from my flash to an aspx page on a different domain which will handle them and put them in a database.  I've tried a number of options, but the only ones that have worked also result in a new window/tab being opened, and I am trying to avoid this. 

      For example, I tried a loadVars with the sendAndLoad() function, but it did not work because the "load" portion requires the aspx page to be on the same domain as the swf- which it is not.

      the send() function does not work either, because it requires you to specify a target (_self, _blank, etc) and that causes a new tab to open, or a redirection on the current page- both unacceptable, as I am trying not to interupt the user's experience on the page the swf is featured on.  send() does succeed in submitting the variables, at least, but as I said, it opens a new tab/redirects current tab.


      One solution is to enable outside domains access on the server-side, but this is not ideal.  I'm hoping for a flash solution.  Any thoughts?


      here's the code:




      var dataLoader = new LoadVars();


      var junkLV:LoadVars = new LoadVars();


      junkLV.onLoad = function(success:Boolean) {


          if (success) {


              trace("We are in business.");


              greenLight_mc._alpha = 100;




          else {




              redLight_mc._alpha = 100;







      dataLoader.firstname = firstName;

      dataLoader.lastname = lastName;

      dataLoader.email = emailAddress;

      dataLoader.dest = destination;

      dataLoader.sendAndLoad("url.aspx", junkLV, "POST");