Create web design to save changes with ajax

633
1
08-12-2013 09:51 AM
RodrigoPam
New Contributor
Hi,

I am creating a web design using lots of HTML5 and Ajax without the need to reload the page at every user interaction. So I need to use Ajax to save the feature changes of the layer. Any idea how I could do this using HTML and JS?

Any help will be welcome.
0 Kudos
1 Reply
DianaBenedict
Occasional Contributor III
So I need to use Ajax to save the feature changes of the layer. Any idea how I could do this using HTML and JS?


I am  not sure I completely understand your question. 

Are you referirng to waiting/deferring the save action until the user selects save and then post all the edits to the server?
Are you indicating that you would rather use your own custom applyEdits or utilize the existing featureLayer.applyEdits to post changes to you layers?

featureLayer.applyEdits documentation:
https://developers.arcgis.com/en/javascript/jsapi/featurelayer-amd.html#applyedits

Here is an example of using the built in editor widget:
https://developers.arcgis.com/en/javascript/jssamples/ed_simpletoolbar.html

You can use the featureLayer with the featureCollection option to create a featureLayer in memory and then create a function to post all changes to the featureLayer in your SDE database.
https://developers.arcgis.com/en/javascript/jssamples/fl_featureCollection.html

Can you please give more information?
0 Kudos