<?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: JavaScript XMLHTTP Post in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/javascript-xmlhttp-post/m-p/1286244#M49091</link>
    <description>&lt;P&gt;Thanks that is what I was missing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 05 May 2023 17:02:23 GMT</pubDate>
    <dc:creator>JohnLucotch2</dc:creator>
    <dc:date>2023-05-05T17:02:23Z</dc:date>
    <item>
      <title>JavaScript XMLHTTP Post</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/javascript-xmlhttp-post/m-p/1285867#M49070</link>
      <description>&lt;P&gt;Can Survey 123 support XMLHTTP Post?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2023 20:00:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/javascript-xmlhttp-post/m-p/1285867#M49070</guid>
      <dc:creator>JohnLucotch2</dc:creator>
      <dc:date>2023-05-04T20:00:51Z</dc:date>
    </item>
    <item>
      <title>Re: JavaScript XMLHTTP Post</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/javascript-xmlhttp-post/m-p/1286214#M49090</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/326974"&gt;@JohnLucotch2&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can send a POST request using xmlhttp in a custom JavaScript function. The important thing to note is &lt;A href="https://doc.arcgis.com/en/survey123/desktop/create-surveys/pulldatajavascript.htm#ESRI_SECTION1_2A1B3F6B4F4741E9BC1BE519E671E565:~:text=Asynchronous%20calls%20are%20not%20supported." target="_self"&gt;asynchronous calls are not supported&lt;/A&gt;&amp;nbsp;so you will need to set the async parameter to false when making the request.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 May 2023 16:04:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/javascript-xmlhttp-post/m-p/1286214#M49090</guid>
      <dc:creator>ZacharySutherby</dc:creator>
      <dc:date>2023-05-05T16:04:36Z</dc:date>
    </item>
    <item>
      <title>Re: JavaScript XMLHTTP Post</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/javascript-xmlhttp-post/m-p/1286244#M49091</link>
      <description>&lt;P&gt;Thanks that is what I was missing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 May 2023 17:02:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/javascript-xmlhttp-post/m-p/1286244#M49091</guid>
      <dc:creator>JohnLucotch2</dc:creator>
      <dc:date>2023-05-05T17:02:23Z</dc:date>
    </item>
    <item>
      <title>Re: JavaScript XMLHTTP Post</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/javascript-xmlhttp-post/m-p/1595710#M61674</link>
      <description>&lt;P&gt;Any chance you can share the code you are using. I am having a hard time achieving the same and have no luck finding samples. Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Mar 2025 18:48:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/javascript-xmlhttp-post/m-p/1595710#M61674</guid>
      <dc:creator>BigLouC</dc:creator>
      <dc:date>2025-03-14T18:48:37Z</dc:date>
    </item>
    <item>
      <title>Re: JavaScript XMLHTTP Post</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/javascript-xmlhttp-post/m-p/1596151#M61700</link>
      <description>&lt;P&gt;I get all that teach a man to fish, but for those of us in a bind, here is the code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;function settime(objectid, schedulechange, mtoken){&lt;/P&gt;&lt;P&gt;let layerURL = `&lt;A href="https://services.arcgis.com/" target="_blank"&gt;https://services.arcgis.com/&lt;/A&gt;`;&lt;/P&gt;&lt;P&gt;let formParams = `f=json&amp;amp;rollbackOnFailure=true&amp;amp;token=`+ mtoken +`&amp;amp;features={&lt;/P&gt;&lt;P&gt;"attributes": {&lt;/P&gt;&lt;P&gt;"OBJECTID":` + objectid + `,&lt;/P&gt;&lt;P&gt;"Instructions":` + schedulechange + `&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;}`&lt;/P&gt;&lt;P&gt;let http = new XMLHttpRequest();&lt;/P&gt;&lt;P&gt;http.open("POST", layerURL, false);&lt;/P&gt;&lt;P&gt;//Send the proper header information along with the request&lt;/P&gt;&lt;P&gt;http.setRequestHeader("Content-type", "application/x-www-form-urlencoded; charset=UTF-8");&lt;/P&gt;&lt;P&gt;//Call a function when the state changes.&lt;/P&gt;&lt;P&gt;http.onreadystatechange = function() {&lt;/P&gt;&lt;P&gt;if (http.readyState == 4 &amp;amp;&amp;amp; http.status == 200) {&lt;/P&gt;&lt;P&gt;console.log(http.responseText);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;};&lt;/P&gt;&lt;P&gt;http.send(formParams)&lt;/P&gt;&lt;P&gt;console.log("Layer done");&lt;/P&gt;</description>
      <pubDate>Mon, 17 Mar 2025 15:55:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/javascript-xmlhttp-post/m-p/1596151#M61700</guid>
      <dc:creator>BigLouC</dc:creator>
      <dc:date>2025-03-17T15:55:07Z</dc:date>
    </item>
  </channel>
</rss>

