<?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 Re: Unexpected token &amp;lt;(…) For Feature Attachment in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/unexpected-token-lt-for-feature-attachment/m-p/503530#M46749</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You usually get this error when a html response is returned when, a json response is expected. Check the request and response in the Network tab and see if it gives a clue what's going wrong.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 Nov 2016 15:21:36 GMT</pubDate>
    <dc:creator>thejuskambi</dc:creator>
    <dc:date>2016-11-29T15:21:36Z</dc:date>
    <item>
      <title>Unexpected token &lt;(…) For Feature Attachment</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/unexpected-token-lt-for-feature-attachment/m-p/503528#M46747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;Got Error &amp;nbsp;"Unexpected token &amp;lt;(…)" For Feature Attachment it is problem with my init.js. &amp;nbsp;If i used&amp;nbsp;&amp;nbsp;&amp;lt;script src="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fjs.arcgis.com%2F3.18%2F" rel="nofollow" target="_blank"&gt;https://js.arcgis.com/3.18/&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&amp;lt;/script&amp;gt; i got correct &amp;nbsp;result.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;html&amp;gt; &lt;BR /&gt; &amp;lt;head&amp;gt;&lt;BR /&gt; &amp;lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&amp;gt;&lt;BR /&gt; &lt;BR /&gt; &amp;lt;meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"&amp;gt;&lt;BR /&gt; &amp;lt;title&amp;gt;SanFrancisco311 - Incidents&amp;lt;/title&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;link rel="stylesheet" href="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2FXXXXX%2Farcgis_js_api%2Flibrary%2F3.17%2F3.17%2Fesri%2Fcss%2Fesri.css" rel="nofollow" target="_blank"&gt;http://XXXXX/arcgis_js_api/library/3.17/3.17/esri/css/esri.css&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt; &amp;lt;style&amp;gt;&lt;BR /&gt; html, body { height: 100%; width: 100%; margin: 0; overflow: hidden; }&lt;BR /&gt; #map { height: 100%; padding: 0;}&lt;BR /&gt; #footer { height: 2em; text-align: center; font-size: 1.1em; padding: 0.5em; }&lt;BR /&gt; .dj_ie .infowindow .window .top .right .user .content { position: relative; }&lt;BR /&gt; .dj_ie .simpleInfoWindow .content {position: relative;}&lt;BR /&gt; &amp;lt;/style&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;script src="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2FXXXX%2Farcgis_js_api%2Flibrary%2F3.17%2F3.17%2Finit.js" rel="nofollow" target="_blank"&gt;http://XXXX/arcgis_js_api/library/3.17/3.17/init.js&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&amp;lt;/script&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt; &amp;lt;script&amp;gt;&lt;BR /&gt; var map;&lt;BR /&gt; &lt;BR /&gt; require([&lt;BR /&gt; "esri/map",&lt;BR /&gt; "esri/layers/FeatureLayer",&lt;BR /&gt; "esri/dijit/editing/AttachmentEditor",&lt;/P&gt;&lt;P&gt;"dojo/parser", "dojo/dom",&lt;/P&gt;&lt;P&gt;"dijit/layout/BorderContainer", "dijit/layout/ContentPane", "dojo/domReady!"&lt;BR /&gt; ], function(&lt;BR /&gt; Map, FeatureLayer, AttachmentEditor,&lt;BR /&gt; parser, dom&lt;BR /&gt; ) {&lt;BR /&gt; parser.parse();&lt;/P&gt;&lt;P&gt;map = new Map("map", { &lt;BR /&gt; basemap: "gray",&lt;BR /&gt; center: [80,18],&lt;BR /&gt; zoom: 8&lt;BR /&gt; });&lt;BR /&gt; map.on("load", mapLoaded);&lt;/P&gt;&lt;P&gt;function mapLoaded() {&lt;BR /&gt;&lt;SPAN&gt; var featureLayer = new FeatureLayer("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2FXXXXXXX%2FAttachments%2FFeatureServer%2F0" rel="nofollow" target="_blank"&gt;http://XXXXXXX/Attachments/FeatureServer/0&lt;/A&gt;&lt;SPAN&gt;",{&lt;/SPAN&gt;&lt;BR /&gt; mode: FeatureLayer.MODE_ONDEMAND&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;map.infoWindow.setContent("&amp;lt;div id='content' style='width:100%'&amp;gt;&amp;lt;/div&amp;gt;");&lt;BR /&gt; map.infoWindow.resize(350,200);&lt;BR /&gt; var attachmentEditor = new AttachmentEditor({}, dom.byId("content"));&lt;BR /&gt; attachmentEditor.startup();&lt;/P&gt;&lt;P&gt;featureLayer.on("click", function(evt) {&lt;BR /&gt; var objectId = evt.graphic.attributes[featureLayer.objectIdField];&lt;BR /&gt; map.infoWindow.setTitle(objectId);&lt;BR /&gt; attachmentEditor.showAttachments(evt.graphic,featureLayer);&lt;BR /&gt; map.infoWindow.show(evt.screenPoint, map.getInfoWindowAnchor(evt.screenPoint));&lt;BR /&gt; });&lt;BR /&gt; map.addLayer(featureLayer);&lt;BR /&gt; }&lt;BR /&gt; });&lt;BR /&gt; &amp;lt;/script&amp;gt;&lt;BR /&gt; &amp;lt;/head&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;body&amp;gt;&lt;BR /&gt; &amp;lt;div data-dojo-type="dijit/layout/BorderContainer" &lt;BR /&gt; data-dojo-props="design:'headline'" &lt;BR /&gt; style="width:100%;height:100%;"&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;div id="map" &lt;BR /&gt; data-dojo-type="dijit/layout/ContentPane" &lt;BR /&gt; data-dojo-props="region:'center'"&amp;gt;&amp;lt;/div&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;div id="footer"&lt;BR /&gt; data-dojo-type="dijit/layout/ContentPane" &lt;BR /&gt; data-dojo-props="region:'bottom'"&amp;gt;&lt;BR /&gt; Click point to view/create/delete attachments.&lt;BR /&gt; &amp;lt;/div&amp;gt;&lt;BR /&gt; &amp;lt;/div&amp;gt;&lt;BR /&gt; &amp;lt;/body&amp;gt;&lt;BR /&gt;&amp;lt;/html&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Nov 2016 09:23:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/unexpected-token-lt-for-feature-attachment/m-p/503528#M46747</guid>
      <dc:creator>PrasadG</dc:creator>
      <dc:date>2016-11-28T09:23:27Z</dc:date>
    </item>
    <item>
      <title>Re: Unexpected token &lt;(…) For Feature Attachment</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/unexpected-token-lt-for-feature-attachment/m-p/503529#M46748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Prasad,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;When I switched the code to use the CDN urls for the esri JS API instead of your local install. The code worked fine.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Nov 2016 14:19:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/unexpected-token-lt-for-feature-attachment/m-p/503529#M46748</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2016-11-29T14:19:08Z</dc:date>
    </item>
    <item>
      <title>Re: Unexpected token &lt;(…) For Feature Attachment</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/unexpected-token-lt-for-feature-attachment/m-p/503530#M46749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You usually get this error when a html response is returned when, a json response is expected. Check the request and response in the Network tab and see if it gives a clue what's going wrong.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Nov 2016 15:21:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/unexpected-token-lt-for-feature-attachment/m-p/503530#M46749</guid>
      <dc:creator>thejuskambi</dc:creator>
      <dc:date>2016-11-29T15:21:36Z</dc:date>
    </item>
    <item>
      <title>Re: Unexpected token &lt;(…) For Feature Attachment</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/unexpected-token-lt-for-feature-attachment/m-p/503531#M46750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi thejus i checked but can't understand &amp;nbsp;network related problems ....is their any simple solution...?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Dec 2016 13:18:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/unexpected-token-lt-for-feature-attachment/m-p/503531#M46750</guid>
      <dc:creator>PrasadG</dc:creator>
      <dc:date>2016-12-06T13:18:32Z</dc:date>
    </item>
    <item>
      <title>Re: Unexpected token &lt;(…) For Feature Attachment</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/unexpected-token-lt-for-feature-attachment/m-p/503532#M46751</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Prasad,&lt;/P&gt;&lt;P&gt;I cannot give you a solution, without knowing what the problem is. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All I am saying is the "&lt;STRONG&gt;Unexpected token &amp;lt; ...&lt;/STRONG&gt;" error occurs when the server returns html instead or JSON. The "&lt;STRONG&gt;&amp;lt;&lt;/STRONG&gt;" is not a valid in JSON, but it is used in HTML to begin a tag. The html can be anything from 'server not found' 404 or 'service unavailable' 503 etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to open the browser's developer window and look through all the requests sent, as well as response received. See if it contains any HTML response out of the ordinary. That will give is a clue what might be the cause of the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this was helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Dec 2016 18:36:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/unexpected-token-lt-for-feature-attachment/m-p/503532#M46751</guid>
      <dc:creator>thejuskambi</dc:creator>
      <dc:date>2016-12-06T18:36:36Z</dc:date>
    </item>
  </channel>
</rss>

