3 Replies Latest reply on Oct 7, 2007 11:08 PM by kittuokkade

    spry ajax and javascript code to flex and actionscript

    nu2cf
      I am new to flex and am trying to converting a spry ajax/javascript site to flex. I am struggling with converting the functions that load the xml data (with an xmlproxy). Can someone help me convert one function? I think I can get all the remaining ones if I get this coded correctly.

      *******Here is an example of the current code to load xml********

      var dsProducts = new Spry.Data.XMLDataSet(null,"ProductSearch/Products/Product");


      function loadQueryData()
      {
      var spryURL = 'includes/getXML.cfm?method=search&category=';
      category = document.SearchForm.category.value;
      srchString = document.SearchForm.query.value;
      var url = spryURL + escape(category) + '&srchString=' + escape(srchString);
      dsProducts.url = url;
      dsProducts.loadData();
      }

      ***********form button************
      <input class="submit" type="button" id="SearchButton" name="SearchButton" value="Search" onclick="loadQueryData();" />
      ***********
      I've tried many different ways to code (too many to include). Can someone help me get this correct in action script. Also the correct variable for the httpservice url. Thank you in advance for your help!