I would like to know if there is anyway to delay the population of an array using javascript. The sequence of what I want to do is:
1. Start HTML site2. Define: var AnyArray = new Array();3. Be able to click on button that fills the ‘AnyArray’ with the contents of an external.js file that contains only data (no functions)
In otherwords, the array would normally be initialize as blank,
then I could
a. fill as needed with operator entered information and jump to step c. below
b. or click on a button to fill the array with previously saved information that I can then modify with other operator information.
c. and finally, I could then copy and paste the contents of the AnyArray that I write to a <textarea> element.
My problem is that I don’t know how to define the array in the initial HTML file so that when I load the external.js file (that overwrites the AnyArray information) I don’t get an error with duplicate definitions. Any ideas? ?