S
sjoshi
I have this HTML fragment
The <abbr title="World Wide Web Consortium">W3C</abbr>
When I try to get the textNode's value, I keep getting an error saying
"object required". On debugging it fails when trying to fet the
lastChild.nodeValue
//This works, I get an element node
var currentAbbr = abbrs;
//This also works and sys World Wide Web Consortium"
var abbrTitle = currentAbbr.getAttribute("title");
//*** This fails ***
var abbrText = currentAbbr.lastChild.nodeValue;
Any hints are greatly appreciated.
thanks
Sunit
The <abbr title="World Wide Web Consortium">W3C</abbr>
When I try to get the textNode's value, I keep getting an error saying
"object required". On debugging it fails when trying to fet the
lastChild.nodeValue
//This works, I get an element node
var currentAbbr = abbrs;
//This also works and sys World Wide Web Consortium"
var abbrTitle = currentAbbr.getAttribute("title");
//*** This fails ***
var abbrText = currentAbbr.lastChild.nodeValue;
Any hints are greatly appreciated.
thanks
Sunit