michaelshavel
asked on
How to print out variables in Javascript for debugging
Hi,
I'm pretty new to Javascript but I do have a programming background.
I have a script from a book (on Ajax) that doesn't work, which isn't much of a surprise since half the scripts in this books source code don't work (Ajax for Dummies).
Anyway, I'm printing out variables using an alert statement but when I get to the statement below the message I get back is "[objectHTMLCollection]". Can someone tell me how I can print out the contents of that object?
-- Snip --
options = xmlDocument.getElementsByT agName("op tion");
alert(options);
---
Thanks!
M
I'm pretty new to Javascript but I do have a programming background.
I have a script from a book (on Ajax) that doesn't work, which isn't much of a surprise since half the scripts in this books source code don't work (Ajax for Dummies).
Anyway, I'm printing out variables using an alert statement but when I get to the statement below the message I get back is "[objectHTMLCollection]". Can someone tell me how I can print out the contents of that object?
-- Snip --
options = xmlDocument.getElementsByT
alert(options);
---
Thanks!
M
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Your welcome! I'm glad I could assist. Thanks for the grade, the points and the fun question.
bol
bol
ASKER