2 Replies Latest reply on Mar 12, 2007 10:04 AM by csawall

    Using HTTPService to fill Combobox from SQL DB

    csawall Level 1
      I'm having a small problem with populating a combobox after I make an httpservice call. The data is showing up, however, it's all showing up on one line versus multiple items for the combobox. For example, I'm getting one line in the dropdown that looks like this:

      DATE1,DATE2,DATE3

      instead of getting:

      DATE1
      DATE2
      DATE3

      I found this article, but it's doesn't really address my problem and I appear to already be doing everything recommended in this article ( http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=60&catid=585&threadid =1220768&highlight_key=y&keyword1=combobox).

      Part of my PHP script:
      -----------------------------------------------
      $return = '<timestamps>';
      while($row=mysql_fetch_array($result))
      {
      $qrtrdisp = $row["quarter"];
      $return .= '<date>'.$qrtrdisp.'</date>';
      }
      $return .= '</timestamps>';
      print($return);
      -----------------------------------------------

      Part of my MXML file:
      -----------------------------------------------
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="getDates.send()">

      <!-- Set call to grab dates for form -->
      <mx:HTTPService id="getDates" url="https://url/file.php" useProxy="false" method="GET" showBusyCursor="true">
      </mx:HTTPService>

      <mx:ComboBox id="dates" x="201" y="6" dataProvider="{getDates.lastResult.timestamps}" labelField="date"></mx:ComboBox>
      -----------------------------------------------

      Any help would be greatly appreciated.

      Thanks,
      Chris