Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DOM troubles and inconsistencies

Status
Not open for further replies.

frozenpeas

Technical User
Sep 13, 2001
893
CA
Hi,

I'm building a Mac dashboard widget. My problem comes down to this line:
Code:
var todaysTitle = todaysNode.getElementsByTagName("title").length+" title nodes";

On Mac OS 10.5.4, this returns a length value of 1.

On Mac OS 10.4.11, this returns a length value of 0.

Does anyone know why this is and how I can solve this problem?

Thanks!

frozenpeas
 
Allow me to elaborate a bit... the correct value is 1.

I can't get it the correct value returned on 10.4.11

frozenpeas
 
Code:
var todaysNode = response.getElementsByTagName("entry")[0];

Markup:
Code:
<entry>
    <published>2008-08-07T16:38:40Z</published>
    <updated>2008-08-07T22:41:58Z</updated>
    <link type="text/html" href="[URL unfurl="true"]http://www.mysite.com/post/10"[/URL] rel="alternate"/>
    <title>My title</title>
    <content type="html">My content</content>
</entry>

So on Mac OS 10.5.4, I'm having no trouble getting what I need. But Mac OS 10.4.11 barfs on it.


frozenpeas
 
Yes, it does. I've narrowed this problem down to the line that sets "todaysTitle". It's got me scratching my head.

frozenpeas
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top