0 Replies Latest reply on Aug 1, 2007 6:26 PM by dbflashnewbie

    LOADVARS not working ...NEED HELP!!!

    dbflashnewbie
      I am trying to create a phonebook with mx 2004 pro, asp, and sql (access for now) using IE 6 sp2
      if i use the following it loads the returning variables into the textbox -but I don't know how i am unable to create an array and send them to a datagrid:

      on (release) {
      loadVariablesNum("dbphone0.asp?Record=" add myrecord, 0);
      myrecord="";
      firstName="";
      lastName="";
      City="";
      errorMsg="Please wait";
      }

      if i use the following i get nothing back:

      var submitListener:Object = new Object();
      submitListener.click = function(evt:Object) {
      var result_lv:LoadVars = new LoadVars();
      result_lv.onLoad = function(success:Boolean) {
      if (success) {
      firstName = result_lv.firstName;
      } else {
      firstName = "Error connecting to server.";
      }
      };
      var send_lv:LoadVars = new LoadVars();
      send_lv.myrecord = myrecord.text;
      send_lv.sendAndLoad("dbphone0.asp", result_lv, "POST");
      };
      submit_button.addEventListener("click", submitListener);

      and if I use the following i get my results back in a new IE window:

      var submitListener:Object = new Object();
      submitListener.click = function(evt:Object) {
      var result_lv:LoadVars = new LoadVars();
      result_lv.onLoad = function(success:Boolean) {
      if (success) {
      firstName = result_lv.firstName;
      } else {
      firstName = "Error connecting to server.";
      }
      };
      var send_lv:LoadVars = new LoadVars();
      send_lv.myrecord = myrecord.text;
      send_lv.send("dbphone0.asp", "POST");
      };
      submit_button.addEventListener("click", submitListener);

      I have played with it for hours trying to use this.firstName or firstName.text so on and so on the debugger doesn't seem to work (remote debugging with the activex plugin does nothing) the internal one doesn't hit the database to pull the info.

      PLEASE HELP!!!!