Leithakor
01-27-2003, 10:34 PM
Ok simply question, hopefully, simple answer.
How would I go about using the document.getElementsByTagName in a reference sense.
ie: placing a specific collection type into an array, so I can actually see the id's and such of all the referenced items (such as DIV's).
So that if I, for instance, use the following make believe function name "getAll('div')" it'll return an alert with the follow information
You searched for the following 'tag-type' of "DIV". These are the only elements with the DIV tag:
divId1, divID2, divID3, divID4,etc.,etc.,etc.
Hopefully you can see where I'm going with this. Main reason for this type of script is for debugging (say for misspelled div names and I can't find out where they are). Any help would be appreciated
Leithakor
How would I go about using the document.getElementsByTagName in a reference sense.
ie: placing a specific collection type into an array, so I can actually see the id's and such of all the referenced items (such as DIV's).
So that if I, for instance, use the following make believe function name "getAll('div')" it'll return an alert with the follow information
You searched for the following 'tag-type' of "DIV". These are the only elements with the DIV tag:
divId1, divID2, divID3, divID4,etc.,etc.,etc.
Hopefully you can see where I'm going with this. Main reason for this type of script is for debugging (say for misspelled div names and I can't find out where they are). Any help would be appreciated
Leithakor