I am trying to learn how to write scripts with Javascript. I have this book named " Building Web Applications with ArcGIS." They provided the data and the sources is file geodatabases. I have the data stored onto our network drive. I can publish the mxd with the file gdb on to our server. However, i can not set the capibilities as feature access when I go to share the map through ArcGIS Online as a web service. I have tested the script which works but I am unable to see any layers when i run the script through chrome.
Is it possible to save the files as shapefile and publish to the server and then host theough ArcGIS Online. Below i have added a code the Author of this book has provided and how to add a map from the server into a javascript.