1 Reply Latest reply on Aug 22, 2008 2:35 PM by ntsiii

    Dynamic Form ---- How to define <mx:model> or Param/value

    zakel Level 1
      I have created a dynamic Form reading input type from external .xml file. Does anyone have advice concerning sending the form data to an external .jsp or .php file without knowing what your <mx:Model> will be? Whenever I try to write:

      <mx:Model>
      <root>
      <q1>data</q1>
      <q2>data</q2>
      </root>
      </mx:Model>

      I receive this error: 1120:Access of undefined property event. I am sure this is because the form elements are created using actionscript and not within mxml.




      I also tried sending it within actionscript using the send.data(param) like this, same error:

      var service:HTTPService = new HTTPService();
      //service.contentType = 'application/xml'
      service.resultFormat = 'e4x';
      //service.destination = 'DefaultHTTP';
      service.url = 'URL removed';
      service.method = "POST";
      service.addEventListener("result",handle_loginResult);
      service.addEventListener("fault",handle_loginfault);
      var o:Object = new Object();
      o.q1 = event.q1;
      o.q2 = event.q2;
      service.send(o);



      Example of the Application with elements rendered

      If you would like to see the complete code: