All commonly scripted objects are included in the integrated Script editor’s Object drop-down list. To identify each object in the Object list box, a Web target uses the following rules of precedence:
If the object has a name, the name is used as the identifier.
If the object has an ID but no name, the ID is used as the identifier.
If the object does not have a name or an ID, it is identified by its array index. (For example, the first image on a page would have the identifier IMG[0].)
Radio buttons Radio buttons in a form are handled differently. Because radio buttons are linked together by assigning them the same name, the identifier for a radio button is its ID. If no ID is given, the ID is the radio button array index.
Client and server scripts Client scripts and server scripts are identified by their array indexes. For example, the first client script on a page would have the identifier SCRIPT[0] and the first server script would have the identifier ServerScript[0]. IDs for scripts are not displayed in the drop-down list.
About array indexes Array indexes for items without an ID, including scripts, correspond to the items' positions in the document. If you insert an item earlier in the document or if you move items around, the index value associated with the item will change and any scripts for the item will now be associated with the new index value.
For example, if you create three client scripts and then move the third script, SCRIPT[2], to the Head section, that script becomes SCRIPT[0], SCRIPT[0] becomes SCRIPT[1], and SCRIPT[1] becomes SCRIPT[2]. If you change the order in Page view, you might need to open the Source view to force the editor to update the array index numbers.