10 Replies Latest reply: Aug 5, 2009 5:30 AM by Arnout Kazemier RSS

    Can't Display Repeat Region Using CSV

    andrewmcgibbon Community Member

      I am attempting to use a CSV document as a dataset and when trying to preview the page I get the error:

       

      Failed to retrieve data set (dsPressAgents) for spry:repeat

       

      Here is what I have in my <HEAD> tag:

       

      <script src="SpryAssets/SpryCSVDataSet.js"></script>
      <script src="SpryAssets/SpryData.js"></script>

       

      (both of these scripts are in the SpryAssets sub directory where I have my document)

       

      Here is what I have in the <BODY> of the document:

       

      <div id="pressAgents" spry:region="dsPressAgents" ><table width="960" border="1" cellspacing="2" cellpadding="2">
        <caption>
          Press Agents
        </caption>
        <tr>
          <th scope="col" spry:sort="SHOW">Show</th>
          <th scope="col" spry:sort="PRESS_AGENCY">Press Agency</th>
          <th scope="col" spry:sort="CONTACT">Contact</th>
          <th scope="col" spry:sort="EMAIL">Email</th>
          <th scope="col" spry:sort="PHONE">Phone</th>
          <th scope="col" spry:sort="OPENING">Opening</th>
          <th scope="col" spry:sort="THEATRE">Theatre</th>
        </tr>
        <tr spry:repeat="dsPressAgents">
          <td>{SHOW}</td>
          <td>{PRESS_AGENCY}</td>
          <td>{CONTACT}</td>
          <td>{EMAIL}</td>
          <td>{PHONE}</td>
          <td>{OPENING}</td>
          <td>{THEATRE}</td>
        </tr>
      </table></div>

       

      <script type="text/javascript">
      var dsPressAgents = new Spry.Data.CSVDataSet("press_agents.csv");
      </script>

       

      I also have the press_agents.csv in the same directory as this document.  Does anyone have any idea why I might be getting this error?

       

      Many thanks in advance.

       

      Andy