PDA

View Full Version : Errors in the TUTORIALS


eduardojacob
10.08.2001, 12:10
Hi,
I was reading the Tutorial:
Scripting for the 5th generation browsers where it says that we can access the colection: document.GetElementsByTagName(tagname)
I tested this in IE5.5 and NN6.1 and it simple doesn't work...
Than I've gone to msdn.microsoft.com and discovered that the correct sintax is:
document.body.GetElementsByTagName

I would like also to leave a suggestion to this site: Why can't we select text from the site ?

Thanks,Bye

Eduardo Jacob

Xanth
10.08.2001, 12:42
No the correct syntax should not be document.body.GetElementsByTagName

Just change the capitol G in "Get" in the first example and it will work fine.

<font color=teal>xanth = document.createElement("person");
xanth.setAttribute("name", "Mike");
xanth.setAttribute("mail", "[url:tx0p4whf8s]belgedin@earthlink.net[/url:tx0p4whf8s]");
document.forum.appendChild(xanth);
</font id=teal>

psych3
10.08.2001, 17:12
the correct syntax is as the tutorial states its document.getElementsByTagName("tagname")
lower case g is used, see W3C. The tutorial examples are working for me on IE6, NS6 and mozilla


~~~~~~~~~~~~~~
Eddie Traversa
http://dhtmlnirvana.com/
~~~~~~~~~~~~~~
Dynamic XHTML Developers Guide
By Jeff Rouyer & Eddie Traversa
Pre-order From Amazon

http://www.amazon.com/exec/obidos/ASIN/1887902546/dhtmlnirvana-20
~~~~~~~~~~~~~~~

paul
10.08.2001, 19:21
<font color=blue></font id=blue> ok, i was wrong, hope nobody saw that :) <font color=blue></font id=blue>

and hey, you should be going to the [url="http://www.w3c.org/"]w3c[/url:k97iez1859] site to check the standards rather than microsoft which is obviously going to be geared towards ie.

paul


Edited by - paul on 10 Aug 2001 5:33:55