1 Reply Latest reply on Feb 27, 2010 11:56 AM by bre_an

    How to transfer data from Flex to javascript?

    saadi khan


      I am building up a website using Extjs library.....I have made flex application (google map) which I want to embed to my same aspx page as Extjs scripts is written. I have a script file named Core.js that is included to Index.aspx page which renders whole page:


      var routeStore; function RecieveRouteXML(str) { routeStore.proxy.data = StringToXml(str); routeStore.load(); } function StringToXml(str) {     var doc;     if (window.ActiveXObject)     {         var doc = new ActiveXObject("Microsoft.XMLDOM");         doc.async = "false";         doc.loadXML(str);         return doc;     }     else     {         var doc = new DOMParser().parseFromString(str,"text/xml");         return doc;     } } Ext.onReady(function() { //......page rendering stuff }


      And I have given path of this Core.js file to my Flex app....It hits my 'RecieveRouteXML' function defined on top of this .js file but finds the object already declared on page loading (that is when page renders) to be undefined. And object named 'routeStore' should be as same as it is been made on load time, but it doesnt.....
      I just want to get data from my flex app (hosted on very same page as Extjs is running on) to send data to my function which will be able to do further stuff......plz help!!!!!!