<?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: difference between dojo.forEach vs. arrayUtil.forEach, do I need a deferred now? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/difference-between-dojo-foreach-vs-arrayutil/m-p/81920#M7493</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That sounded promising, but it didn't help.&amp;nbsp; I can put a console.log right before I call the function to submit the print and see that I have 4 different inputData strings corresponding with my 4 grids. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Maybe my problem lies elsewhere.&amp;nbsp; I have a form that I'm using to manage the call to the script that does the actual saving.&amp;nbsp; I had to change it too to be in AMD format.&amp;nbsp; I'm not familiar with forms, so maybe the change here is the problem.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;non-AMD - HTML&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;lt;div&amp;gt;
&amp;lt;form data-dojo-type="dijit.form.Form" method="post" action="" style="height: 0px; width: 0px; display:none;" class="dlform" id="downloadForm" target="_blank"&amp;gt;
&amp;lt;input type="hidden" name="report" class="ri" id="reportinput" value="" /&amp;gt;
&amp;lt;input type="hidden" name="filename" class="fn" id="filename" value="" /&amp;gt;

&amp;lt;/form&amp;gt;
 &amp;lt;button id="btnExportGridCSVsubmit" dojotype="dijit.form.Button" onClick="exportGridCSV();"title="Save Search Results to CSV file"&amp;gt;Save List&amp;lt;/button&amp;gt;&amp;nbsp; 
&amp;lt;/div&amp;gt;
&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;function that executes on the click&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
function submitCSVprint(gridName, inputData) {
//opens the data in a hidden form used for printing and allows the user to either open or save the file.
var url = "webservices/csv.ashx";
var f = dojo.byId("downloadForm");
f.action = url;
dojo.byId("reportinput").value = inputData;
var distType = dijit.byId("distTypeSelect").value;
var distNum = dojo.byId("txtDistNumber").value;
dojo.byId("filename").value = distType+"Dist_"+distNum+"_"+gridName;
f.submit();
}

&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;One of the things I had to do when I switch to AMD was put the action of the form in it's construction, it didn't like having it added as the action within a function.&amp;nbsp; I was getting a 405 Server Error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;AMD version - HTML&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;lt;div&amp;gt;
&amp;lt;form id="downloadForm" data-dojo-type="dijit/form/Form" method="post" action="webservices/csv.ashx" class="dlform"&amp;nbsp; target="_blank"&amp;gt;
&amp;lt;input type="hidden" name="report" class="ri" id="reportinput" value="" /&amp;gt;
&amp;lt;input&amp;nbsp; type="hidden" name="filename" class="fn" id="filename" value="" /&amp;gt;

&amp;lt;/form&amp;gt;

&amp;lt;/div&amp;gt;
&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;and the function &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
function submitCSVprint(gridName, inputData) {&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; var f = registry.byId("downloadForm");
&amp;nbsp;&amp;nbsp;&amp;nbsp; dom.byId("reportinput").value = inputData;
&amp;nbsp;&amp;nbsp;&amp;nbsp; var outFileName = setOutName(gridName);
&amp;nbsp;&amp;nbsp;&amp;nbsp; dom.byId("filename").value = outFileName;
&amp;nbsp;&amp;nbsp;&amp;nbsp; f.submit();
}
function setOutName (gridName) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; var distType = registry.byId("distTypeSelect").value;
&amp;nbsp;&amp;nbsp;&amp;nbsp; var distNum = registry.byId("txtDistNumber").value;
&amp;nbsp;&amp;nbsp;&amp;nbsp; var outFileName = distType+"Dist_"+distNum+"_"+gridName;
 //&amp;nbsp; console.log("outFileName is " + outFileName);
&amp;nbsp;&amp;nbsp;&amp;nbsp; return outFileName;
}
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Maybe the submit to a AMD dijit/form/Form behaves differently than the non-AMD version?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I wish I had the hang of using gitHub, so I could post these there.&amp;nbsp; I have these on our test server, which you should be able to get to.&amp;nbsp; No guarantee that I haven't broken it worse before anyone gets a chance to look at it.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;non AMD version &lt;/SPAN&gt;&lt;A href="https://ogitest.oa.mo.gov/LEGIS/printExample/index.html" rel="nofollow noopener noreferrer" target="_blank"&gt;https://ogitest.oa.mo.gov/LEGIS/printExample/index.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;AMD version&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="https://ogitest.oa.mo.gov/LEGIS/LegislativeAnalysis/index.html" rel="nofollow noopener noreferrer" target="_blank"&gt;https://ogitest.oa.mo.gov/LEGIS/LegislativeAnalysis/index.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You'll need to turn on some layers first and then do a search on a district number.&amp;nbsp; The idea is to dynamically change what is queried and displayed.&amp;nbsp; That part of working, but there's no way I'm going to get away with leaving out a print or save function.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Dec 2021 23:08:18 GMT</pubDate>
    <dc:creator>TracySchloss</dc:creator>
    <dc:date>2021-12-10T23:08:18Z</dc:date>
    <item>
      <title>difference between dojo.forEach vs. arrayUtil.forEach, do I need a deferred now?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/difference-between-dojo-foreach-vs-arrayutil/m-p/81918#M7491</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I started this as a reply to the thread about printing/saving a grid to CSV, but I'm not sure my problem is with that portion of my code.&amp;nbsp; I have several grids that I'd like to save as CSV.&amp;nbsp; In my non-AMD version, I had a dojo.forEach loop.&amp;nbsp; The data each grid is processed into a string, which is the input to the function that does the actual saving.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;in pseudoCode&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
function exportGridCSV() {
//where qTaskNameList is an array of the names of all the grids I created
&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.forEach(qTaskNameList, function(gridName) {
var gridData = dijit.byId(gridName+"_grid");
...
code to that takes the data from the grid, creates output string called inputData; 
...
submitCSVPrint (gridName, inputData);
});
}
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;SPAN&gt;In this non-AMD version, the function loop processes each of my grids and I end up a dialog for "Save As" or "Open With" for each of the grids I processed in the dojo.forEach loop.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the AMD version, I can put log entries and it seems to be looping through each grid, but I only ever get one "Save As" dialog. I think this is maybe because I'm now in asynchronous mode?&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
function exportGridCSV() {

&amp;nbsp;&amp;nbsp;&amp;nbsp; arrayUtil.forEach(qTaskNameList, function(gridName) {
var gridData = registry.byId(gridName+"_grid");
...
code to that takes the data from the grid, creates an output string called inputData; 
...
submitCSVPrint (gridName, inputData);
});
}
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Do I need to set up some sort of deferred for this?&amp;nbsp; I didn't expect this behavior, I thought dojo.forEach and arrayUtil.forEach were more the same.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Nov 2013 13:05:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/difference-between-dojo-foreach-vs-arrayutil/m-p/81918#M7491</guid>
      <dc:creator>TracySchloss</dc:creator>
      <dc:date>2013-11-26T13:05:17Z</dc:date>
    </item>
    <item>
      <title>Re: difference between dojo.forEach vs. arrayUtil.forEach, do I need a deferred now?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/difference-between-dojo-foreach-vs-arrayutil/m-p/81919#M7492</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Try something like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;

function exportGridCSV() {
&amp;nbsp; qTaskNameList.forEach(function(gridName){
&amp;nbsp;&amp;nbsp;&amp;nbsp; var gridData = registry.byId(gridName+"_grid");
&amp;nbsp;&amp;nbsp;&amp;nbsp; //code to that takes the data from the grid, creates an output string called inputData; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; submitCSVPrint (gridName, inputData);
&amp;nbsp; });
}
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Another example, this is a loop I use that removes graphics from my graphicsLayer based on the type attribute&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
this.graphicsLayer.graphics.forEach(lang.hitch(this, function (g) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (g.attributes) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (g.attributes.type === i18n.customLabel) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.graphicsLayer.remove(g);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
}));
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 23:08:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/difference-between-dojo-foreach-vs-arrayutil/m-p/81919#M7492</guid>
      <dc:creator>JonathanUihlein</dc:creator>
      <dc:date>2021-12-10T23:08:15Z</dc:date>
    </item>
    <item>
      <title>Re: difference between dojo.forEach vs. arrayUtil.forEach, do I need a deferred now?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/difference-between-dojo-foreach-vs-arrayutil/m-p/81920#M7493</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That sounded promising, but it didn't help.&amp;nbsp; I can put a console.log right before I call the function to submit the print and see that I have 4 different inputData strings corresponding with my 4 grids. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Maybe my problem lies elsewhere.&amp;nbsp; I have a form that I'm using to manage the call to the script that does the actual saving.&amp;nbsp; I had to change it too to be in AMD format.&amp;nbsp; I'm not familiar with forms, so maybe the change here is the problem.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;non-AMD - HTML&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;lt;div&amp;gt;
&amp;lt;form data-dojo-type="dijit.form.Form" method="post" action="" style="height: 0px; width: 0px; display:none;" class="dlform" id="downloadForm" target="_blank"&amp;gt;
&amp;lt;input type="hidden" name="report" class="ri" id="reportinput" value="" /&amp;gt;
&amp;lt;input type="hidden" name="filename" class="fn" id="filename" value="" /&amp;gt;

&amp;lt;/form&amp;gt;
 &amp;lt;button id="btnExportGridCSVsubmit" dojotype="dijit.form.Button" onClick="exportGridCSV();"title="Save Search Results to CSV file"&amp;gt;Save List&amp;lt;/button&amp;gt;&amp;nbsp; 
&amp;lt;/div&amp;gt;
&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;function that executes on the click&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
function submitCSVprint(gridName, inputData) {
//opens the data in a hidden form used for printing and allows the user to either open or save the file.
var url = "webservices/csv.ashx";
var f = dojo.byId("downloadForm");
f.action = url;
dojo.byId("reportinput").value = inputData;
var distType = dijit.byId("distTypeSelect").value;
var distNum = dojo.byId("txtDistNumber").value;
dojo.byId("filename").value = distType+"Dist_"+distNum+"_"+gridName;
f.submit();
}

&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;One of the things I had to do when I switch to AMD was put the action of the form in it's construction, it didn't like having it added as the action within a function.&amp;nbsp; I was getting a 405 Server Error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;AMD version - HTML&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;lt;div&amp;gt;
&amp;lt;form id="downloadForm" data-dojo-type="dijit/form/Form" method="post" action="webservices/csv.ashx" class="dlform"&amp;nbsp; target="_blank"&amp;gt;
&amp;lt;input type="hidden" name="report" class="ri" id="reportinput" value="" /&amp;gt;
&amp;lt;input&amp;nbsp; type="hidden" name="filename" class="fn" id="filename" value="" /&amp;gt;

&amp;lt;/form&amp;gt;

&amp;lt;/div&amp;gt;
&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;and the function &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
function submitCSVprint(gridName, inputData) {&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; var f = registry.byId("downloadForm");
&amp;nbsp;&amp;nbsp;&amp;nbsp; dom.byId("reportinput").value = inputData;
&amp;nbsp;&amp;nbsp;&amp;nbsp; var outFileName = setOutName(gridName);
&amp;nbsp;&amp;nbsp;&amp;nbsp; dom.byId("filename").value = outFileName;
&amp;nbsp;&amp;nbsp;&amp;nbsp; f.submit();
}
function setOutName (gridName) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; var distType = registry.byId("distTypeSelect").value;
&amp;nbsp;&amp;nbsp;&amp;nbsp; var distNum = registry.byId("txtDistNumber").value;
&amp;nbsp;&amp;nbsp;&amp;nbsp; var outFileName = distType+"Dist_"+distNum+"_"+gridName;
 //&amp;nbsp; console.log("outFileName is " + outFileName);
&amp;nbsp;&amp;nbsp;&amp;nbsp; return outFileName;
}
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Maybe the submit to a AMD dijit/form/Form behaves differently than the non-AMD version?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I wish I had the hang of using gitHub, so I could post these there.&amp;nbsp; I have these on our test server, which you should be able to get to.&amp;nbsp; No guarantee that I haven't broken it worse before anyone gets a chance to look at it.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;non AMD version &lt;/SPAN&gt;&lt;A href="https://ogitest.oa.mo.gov/LEGIS/printExample/index.html" rel="nofollow noopener noreferrer" target="_blank"&gt;https://ogitest.oa.mo.gov/LEGIS/printExample/index.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;AMD version&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="https://ogitest.oa.mo.gov/LEGIS/LegislativeAnalysis/index.html" rel="nofollow noopener noreferrer" target="_blank"&gt;https://ogitest.oa.mo.gov/LEGIS/LegislativeAnalysis/index.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You'll need to turn on some layers first and then do a search on a district number.&amp;nbsp; The idea is to dynamically change what is queried and displayed.&amp;nbsp; That part of working, but there's no way I'm going to get away with leaving out a print or save function.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 23:08:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/difference-between-dojo-foreach-vs-arrayutil/m-p/81920#M7493</guid>
      <dc:creator>TracySchloss</dc:creator>
      <dc:date>2021-12-10T23:08:18Z</dc:date>
    </item>
    <item>
      <title>Re: difference between dojo.forEach vs. arrayUtil.forEach, do I need a deferred now?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/difference-between-dojo-foreach-vs-arrayutil/m-p/81921#M7494</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey Tracy,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can take a look at your application now.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;While I do that, if you don't mind me asking, why didn't the forEach loop work?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What is qTaskNameList exactly as far as structure goes?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Does this not loop the same number of times as qTaskNameList.length?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Nov 2013 16:37:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/difference-between-dojo-foreach-vs-arrayutil/m-p/81921#M7494</guid>
      <dc:creator>JonathanUihlein</dc:creator>
      <dc:date>2013-11-26T16:37:48Z</dc:date>
    </item>
    <item>
      <title>Re: difference between dojo.forEach vs. arrayUtil.forEach, do I need a deferred now?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/difference-between-dojo-foreach-vs-arrayutil/m-p/81922#M7495</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;qTaskNameList is created when I execute the queryTasks, which is based on the current number of visible layers in the TOC.&amp;nbsp; It does seem to be looping the required number of times.&amp;nbsp; I can put break points or console.log entries throughout and see that I'm generating multiple data strings, each starting with the correct column headers followed by rows of data.&amp;nbsp; What I think should happen is that as soon as the string is formatted, it would be passed to the submitCSVprint function, where the data would be saved,&amp;nbsp; and then loop back to process the next grid.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;At first I thought the function subCSVprint was only running one time,&amp;nbsp; but I put some breakpoints into it as well and it is getting called multiple times.&amp;nbsp; It's more like the form.submit is only executing once.&amp;nbsp;&amp;nbsp; That the act of the saving breaks out of the loop.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It's probably a curly brace in the wrong place or something equally as hard to spot.&amp;nbsp; Wouldn't that be nice?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Nov 2013 17:21:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/difference-between-dojo-foreach-vs-arrayutil/m-p/81922#M7495</guid>
      <dc:creator>TracySchloss</dc:creator>
      <dc:date>2013-11-26T17:21:14Z</dc:date>
    </item>
    <item>
      <title>Re: difference between dojo.forEach vs. arrayUtil.forEach, do I need a deferred now?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/difference-between-dojo-foreach-vs-arrayutil/m-p/81923#M7496</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I don't find myself saying this very often, but it works fine in IE 8.&amp;nbsp; In Firefox, it looks to be saving the first grid's data.&amp;nbsp; In Chrome it looks to be the last grid's data.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In IE, the titlePane containing the save button is not a separate pane!&amp;nbsp; The button appears at the end of the previous titlePane.&amp;nbsp; There must be something in the definition of the form that IE really doesn't like.&amp;nbsp; BUT it works when I click it ....&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It just gets stranger and stranger.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Nov 2013 19:56:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/difference-between-dojo-foreach-vs-arrayutil/m-p/81923#M7496</guid>
      <dc:creator>TracySchloss</dc:creator>
      <dc:date>2013-11-26T19:56:34Z</dc:date>
    </item>
    <item>
      <title>Re: difference between dojo.forEach vs. arrayUtil.forEach, do I need a deferred now?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/difference-between-dojo-foreach-vs-arrayutil/m-p/81924#M7497</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Perhaps only one form submission is allowed? The page seems to do a refresh. Also, I don't think forEach guarantees order, which could be the browser discrepancy. I could be wrong.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Some alternatives:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Package all of the outputs together with one form submit and parse it on the .ashx page.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Make one or multiple ajax (post) calls to the .ashx page rather than using a form submit.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Nov 2013 13:51:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/difference-between-dojo-foreach-vs-arrayutil/m-p/81924#M7497</guid>
      <dc:creator>MatthewLofgren</dc:creator>
      <dc:date>2013-11-27T13:51:23Z</dc:date>
    </item>
    <item>
      <title>Re: difference between dojo.forEach vs. arrayUtil.forEach, do I need a deferred now?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/difference-between-dojo-foreach-vs-arrayutil/m-p/81925#M7498</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I"m not sure if it's just one submission allowed or if the first submission is just preventing the rest from completing.&amp;nbsp; I'm thinking it's the behavior of the action of the form, because the script hasn't changed.&amp;nbsp; I agree with the order of the processing being inconsistent across the browsers, that's why I'm seeing the first set of data in Firefox, but the last when I try it in Chrome.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Incidently, I didn't write the csv.ashx script I'm using, I got it from here &lt;/SPAN&gt;&lt;A href="http://gis.stackexchange.com/questions/67862/export-dojo-datagrid-results-to-csv-in-javascript-web-application"&gt;http://gis.stackexchange.com/questions/67862/export-dojo-datagrid-results-to-csv-in-javascript-web-application&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp; I don't know the scripting language at all and I'm not going to be learning it just to get this to work.&amp;nbsp;&amp;nbsp; All I know is it says c# in the header.&amp;nbsp; I followed the instructions from that thread and it had been working (in a non-AMD version).&amp;nbsp; Sometimes updating your code is a painful process...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Nov 2013 14:46:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/difference-between-dojo-foreach-vs-arrayutil/m-p/81925#M7498</guid>
      <dc:creator>TracySchloss</dc:creator>
      <dc:date>2013-11-27T14:46:21Z</dc:date>
    </item>
    <item>
      <title>Re: difference between dojo.forEach vs. arrayUtil.forEach, do I need a deferred now?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/difference-between-dojo-foreach-vs-arrayutil/m-p/81926#M7499</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Could try something like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
function submitCSVprint(gridName, inputData) {&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; //var f = registry.byId("downloadForm");
&amp;nbsp;&amp;nbsp;&amp;nbsp; //dom.byId("reportinput").value = inputData;
&amp;nbsp;&amp;nbsp;&amp;nbsp; var outFileName = setOutName(gridName);
&amp;nbsp;&amp;nbsp;&amp;nbsp; //dom.byId("filename").value = outFileName;
&amp;nbsp;&amp;nbsp;&amp;nbsp; //f.submit();
 
 require(["dojo/request"], function(request){
&amp;nbsp; request.post("webservices/csv.ashx", {
&amp;nbsp;&amp;nbsp; data: {
&amp;nbsp;&amp;nbsp;&amp;nbsp; report: inputData,
&amp;nbsp;&amp;nbsp;&amp;nbsp; filename: outFileName
&amp;nbsp;&amp;nbsp; }
&amp;nbsp; }).then(function(text){
&amp;nbsp;&amp;nbsp; console.log("it worked");
&amp;nbsp; });
 }); 
}
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 23:08:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/difference-between-dojo-foreach-vs-arrayutil/m-p/81926#M7499</guid>
      <dc:creator>MatthewLofgren</dc:creator>
      <dc:date>2021-12-10T23:08:21Z</dc:date>
    </item>
    <item>
      <title>Re: difference between dojo.forEach vs. arrayUtil.forEach, do I need a deferred now?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/difference-between-dojo-foreach-vs-arrayutil/m-p/81927#M7500</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That didn't generate an error, but it didn't save anything either.&amp;nbsp; I just got multiple entries in the console.log of 'it worked' but it really didn't.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Nov 2013 17:33:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/difference-between-dojo-foreach-vs-arrayutil/m-p/81927#M7500</guid>
      <dc:creator>TracySchloss</dc:creator>
      <dc:date>2013-11-27T17:33:05Z</dc:date>
    </item>
  </channel>
</rss>

