My script uses an array like this:
var locations = [
['Location 1 Name', 'New York, NY', 'Location 1 URL'],
['Location 2 Name', 'Newark, NJ', 'Location 2 URL'],
['Location 3 Name', 'Philadelphia, PA', 'Location 3 URL'],
];
I have a page with two list webparts (A and B). webpart A/List A has two columns
Title and Address
Using javascript, i need to be able to grab the data from Address column and pass that to my array.
I've tried ANYTHING javscript related for sharepoint, but nothing seems to run.
i have script.js in my SiteAssets folder and in a CONTENT EDITOR webpart i added the call for the script <script src=pathToMyScript> </script>
I tried running a alert("hello"); to confirm that its working and the alert works fine, but as soon as i add javascript that i've seen anywhere in this page or other pages, nothing seems to be working as nothing shows or loads.
Things to note: Treat me as if i knew nothing about javascript and sharepoint. However, i do know how to program in javascript. I never used sp.js libraries.
alert
That is 1996 script kiddie coding... Learn to useconsole.log( )
(warning: don't leave console statements in the final code, as Internet Explorer only allows use when the F12 console is opened, so when your user says it doesn't work, your test with the Console openened will work... I burn myself on this one in every project still