JavaScript Newbie-calculate areas for feature service

Discussion created by aquateam on Jun 20, 2013
Latest reply on Jul 3, 2013 by JGravois-esristaff

I'm working on a web app that would allow users to calculate the irrigation requirement for their properties by geocoding their address and creating polygons around different landscape features.  I created a tiled mapping service from my imagery and a editable feature service in ArcGIS Desktop and then created a web application using ArcGIS online.  This is where I've run into problems. 

I'm a total novice in terms of JavaScript so I've been teaching myself the basics over the last few weeks.  I've studied the documentation for the JavaScript API and the code samples but I still have questions about how to integrate the code into my web app.  For example, I need to have the ability to calculate the area of the polygons.  I've experimented with that widget in the API sandbox, but I'm having trouble getting it into my app.  Do I extract the proper block of code out of the sample and attach it to my app in a zip file?  These are probably silly questions to all the pros out there but I'm a newbie and could use some guidance.  Thanks for any help or insight you might be able to provide.