<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Data Access - Plain Text Sample not working in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/data-access-plain-text-sample-not-working/m-p/31729#M2567</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I need to grab a text file that is stored at the same level as the javascript/html app and process it for lat-lon.&amp;nbsp; I have something similar that works with a ArcGIS Extension for Google API but need to really use the ESRI Community Maps service (as our data is included) so I am trying to re-create with just the ArcGIS API for JS.&amp;nbsp; Amazing how different the two are.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyway, I cannot get this sample to work and display my textfile.&amp;nbsp; I have only changed the url (tried various versions of the path), removed the proxy line of code and set the useProxy: false (or removed it altogether with one try).&amp;nbsp; The text file is sitting at the same level in the dir. structure as the .html.&amp;nbsp; Should not have a proxy issue.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In IE, I get " Member not found" error in the Content box.&amp;nbsp; In Fire fox, I just get "[Object Event]" in the Content box.&amp;nbsp; I never get the contents of the text file.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It is here temporarily:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://gis.greenvillesc.gov/testonly/"&gt;http://gis.greenvillesc.gov/testonly/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can see the text file itself at: &lt;/SPAN&gt;&lt;A href="http://gis.greenvillesc.gov/testonly/testurl.txt"&gt;http://gis.greenvillesc.gov/testonly/testurl.txt&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the Google API based app, I used gXmlHttp to load the text file.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help will be appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Carmen&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 Apr 2011 19:39:16 GMT</pubDate>
    <dc:creator>CarmenDurham</dc:creator>
    <dc:date>2011-04-04T19:39:16Z</dc:date>
    <item>
      <title>Data Access - Plain Text Sample not working</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/data-access-plain-text-sample-not-working/m-p/31729#M2567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I need to grab a text file that is stored at the same level as the javascript/html app and process it for lat-lon.&amp;nbsp; I have something similar that works with a ArcGIS Extension for Google API but need to really use the ESRI Community Maps service (as our data is included) so I am trying to re-create with just the ArcGIS API for JS.&amp;nbsp; Amazing how different the two are.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyway, I cannot get this sample to work and display my textfile.&amp;nbsp; I have only changed the url (tried various versions of the path), removed the proxy line of code and set the useProxy: false (or removed it altogether with one try).&amp;nbsp; The text file is sitting at the same level in the dir. structure as the .html.&amp;nbsp; Should not have a proxy issue.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In IE, I get " Member not found" error in the Content box.&amp;nbsp; In Fire fox, I just get "[Object Event]" in the Content box.&amp;nbsp; I never get the contents of the text file.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It is here temporarily:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://gis.greenvillesc.gov/testonly/"&gt;http://gis.greenvillesc.gov/testonly/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can see the text file itself at: &lt;/SPAN&gt;&lt;A href="http://gis.greenvillesc.gov/testonly/testurl.txt"&gt;http://gis.greenvillesc.gov/testonly/testurl.txt&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the Google API based app, I used gXmlHttp to load the text file.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help will be appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Carmen&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Apr 2011 19:39:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/data-access-plain-text-sample-not-working/m-p/31729#M2567</guid>
      <dc:creator>CarmenDurham</dc:creator>
      <dc:date>2011-04-04T19:39:16Z</dc:date>
    </item>
    <item>
      <title>Re: Data Access - Plain Text Sample not working</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/data-access-plain-text-sample-not-working/m-p/31730#M2568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It looks like it's returning an object rather than say just the text of the file.&amp;nbsp; Do you need to reference it similar to this perhaps?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;dojo.byId("content").value = response&lt;/SPAN&gt;&lt;STRONG&gt;.value&lt;/STRONG&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Apr 2011 20:00:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/data-access-plain-text-sample-not-working/m-p/31730#M2568</guid>
      <dc:creator>MarbryHardin</dc:creator>
      <dc:date>2011-04-04T20:00:44Z</dc:date>
    </item>
    <item>
      <title>Re: Data Access - Plain Text Sample not working</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/data-access-plain-text-sample-not-working/m-p/31731#M2569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The simple solution would be to switch to dojo.xhrGet (literally replace "esri.request" with "dojo.xhrGet" and your code should work). &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem has to do with how &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/namespace_esri.htm#request"&gt;esri.request()&lt;/A&gt;&lt;SPAN&gt; works. When you use esri.request() to do a GET, you're actually doing a dojo.io.script.get(). This function always expects javascript/json and ignores the "handleAs" parameter. When you use esri.request() to do a POST(usually via a proxy), you do are really doing a dojo.xhrPost() which does support a "handleAs" parameter. This is what the sample you referenced is doing- a POST via esri.request() which goes through a proxy to retrieve the text file used in the example.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Apr 2011 22:19:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/data-access-plain-text-sample-not-working/m-p/31731#M2569</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2011-04-04T22:19:14Z</dc:date>
    </item>
    <item>
      <title>Re: Data Access - Plain Text Sample not working</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/data-access-plain-text-sample-not-working/m-p/31732#M2570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Derek,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you!&amp;nbsp; That worked.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, based on Derek's information, here is the portion that I changed.&amp;nbsp; I replaced esri.request with dojo.xhrGet and totally removed the {useProxy: true}&amp;nbsp; parameter.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var requestHandle = dojo.xhrGet({
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; url: url.path,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; content: url.query,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; handleAs: "text",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; load: requestSucceeded,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; error: requestFailed
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again - I have been primarily coding with Flex API so the javascript API is new territory -- you saved me a lot of time.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Carmen&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:15:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/data-access-plain-text-sample-not-working/m-p/31732#M2570</guid>
      <dc:creator>CarmenDurham</dc:creator>
      <dc:date>2021-12-10T21:15:59Z</dc:date>
    </item>
    <item>
      <title>Re: Data Access - Plain Text Sample not working</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/data-access-plain-text-sample-not-working/m-p/31733#M2571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Glad to help!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Apr 2011 14:59:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/data-access-plain-text-sample-not-working/m-p/31733#M2571</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2011-04-05T14:59:50Z</dc:date>
    </item>
  </channel>
</rss>

