eldan88 Posted November 12, 2013 Share Posted November 12, 2013 Hey Guys, I am new to java, and was looking into the getElementsByTagName functionality. Every time I use that method, I get the following error message on my firebug console message "ReferenceError: consloe is not defined var myLinks = document.getElementsByTagName("a") " Below is my code. Any help would be highly appreciated! var myLinks = document.getElementsByTagName("a"); consloe.log ("Links", myLinks.length); Quote Link to comment https://forums.phpfreaks.com/topic/283854-need-help-with-getelementsbytagname/ Share on other sites More sharing options...
dalecosp Posted November 12, 2013 Share Posted November 12, 2013 You spelled "console" wrong --- and "consloe" isn't defined. Quote Link to comment https://forums.phpfreaks.com/topic/283854-need-help-with-getelementsbytagname/#findComment-1458056 Share on other sites More sharing options...
dalecosp Posted November 12, 2013 Share Posted November 12, 2013 (edited) Incidentally, this is Javascript, which is NOT Java.Search Youtube for Douglas Crockford and spend about 3 hours on his tutorial series from Yahoo! It will help a lot. Edited November 12, 2013 by dalecosp Quote Link to comment https://forums.phpfreaks.com/topic/283854-need-help-with-getelementsbytagname/#findComment-1458057 Share on other sites More sharing options...
Irate Posted November 13, 2013 Share Posted November 13, 2013 Better yet, if you're looking for an extensive, intricate book on JavaScript, check out David Flanagan's JavaScript: The Definitive Guide (it's around 60$ or 42€, but it is worth it, plus, it has cheaper, digital copies). Quote Link to comment https://forums.phpfreaks.com/topic/283854-need-help-with-getelementsbytagname/#findComment-1458099 Share on other sites More sharing options...
eldan88 Posted November 13, 2013 Author Share Posted November 13, 2013 Thanks guys! I was really tired when I wrote this post, guess that's why i didn't see that misspelling. Quote Link to comment https://forums.phpfreaks.com/topic/283854-need-help-with-getelementsbytagname/#findComment-1458119 Share on other sites More sharing options...
dalecosp Posted November 13, 2013 Share Posted November 13, 2013 Thanks guys! I was really tired when I wrote this post, guess that's why i didn't see that misspelling. It happens to everyone at some point or another. Get some sleep before coding whenever possible! ;-) Quote Link to comment https://forums.phpfreaks.com/topic/283854-need-help-with-getelementsbytagname/#findComment-1458137 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.