Re: nullpointer

On Thu, 31 May 2001, "Joseph Kesselman" wrote:

> 
> 
> >x.setStart(document.getElementsByTagName("p")[0],0);
You have to check if element document.getElementsByTagName("p") exists or it will crash when you try to get document.getElementsByTagName("p")[0] since you can not get an array value from a null pointer.

> >x.insertNode(document.getElementsByTagName("div")[0]);
the same applies to document.getElementsByTagName("div")


Find the best deals on the web at AltaVista Shopping!
http://www.shopping.altavista.com

Received on Friday, 1 June 2001 06:52:32 UTC