Easy A
Would you like to react to this message? Create an account in a few clicks or log in to continue.


 
HomeHome  Latest imagesLatest images  SearchSearch  RegisterRegister  Log inLog in  

Share
 

 Blank Nodes In IE

View previous topic View next topic Go down 
AuthorMessage
Kinkii
Member
Member
avatar

Posts : 13
Join date : 2011-03-09

Blank Nodes In IE Empty
PostSubject: Blank Nodes In IE   Blank Nodes In IE EmptyMon Apr 18, 2011 8:57 pm

Hey guys, I'm new here so apologies if this is in the wrong place or whatever.

I currently have a website that pulls in some XML. Every browser loves it, but (surprise!) Internet Explorer can't pull in anything past the first empty node.

You can see this in action here:
http://juicenothing.com/best-albums-...no-work-ie.php

Please help me! I will love you forever!
Back to top Go down
Momment
Member
Member
Momment

Posts : 19
Join date : 2011-03-09

Blank Nodes In IE Empty
PostSubject: Re: Blank Nodes In IE   Blank Nodes In IE EmptyMon Apr 18, 2011 8:58 pm

It is rather a -problem of HTML and JavaScript (XML DOM). Your document has no Doctype, no HTML, no HEAD and no BODY. Some of them, in different conditions, are not required, but all of them, in your case, might bring errors. The Doctype is a must.

You have several JavaScript errors, also:

1. swfobject is not defined
http://juicenothing.com/best-albums-...no-work-ie.php
Line 65

2. handler is undefined
http://juicenothing.com/js/jquery-1.2.6.js
Line 1834

3. document.getElementById("curtains") is null
http://juicenothing.com/best-albums-...no-work-ie.php
Line 476

Regarding the XML DOM, you have some empty tags <SPOTIFY></SPOTIFY>. It looks like IE consider them as absolutely empty, thus without any textNode which could be the childNodes[0]

Instead of
Code:

x[i].getElementsByTagName('SPOTIFY')[0].childNodes[0].nodeValue

you may try
Code:

x[i].getElementsByTagName('SPOTIFY')[0].textContent || x[i].getElementsByTagName('SPOTIFY')[0].text
Back to top Go down
Kinkii
Member
Member
avatar

Posts : 13
Join date : 2011-03-09

Blank Nodes In IE Empty
PostSubject: Re: Blank Nodes In IE   Blank Nodes In IE EmptyMon Apr 18, 2011 8:59 pm

Wait a minute... are you God? That XML worked perfectly, thank you soooo much!
Back to top Go down
Momment
Member
Member
Momment

Posts : 19
Join date : 2011-03-09

Blank Nodes In IE Empty
PostSubject: Re: Blank Nodes In IE   Blank Nodes In IE EmptyMon Apr 18, 2011 9:01 pm

I see you have not set the Doctype, HTML, HEAD and BODY. In IE9 (and in IE8/IE7 under IE9) your site is graphically out of balance, because the lack of the Doctype will force IE to work in quirksmode, aka without any standard rules
Back to top Go down
Kinkii
Member
Member
avatar

Posts : 13
Join date : 2011-03-09

Blank Nodes In IE Empty
PostSubject: Re: Blank Nodes In IE   Blank Nodes In IE EmptyMon Apr 18, 2011 9:01 pm

I know, I noticed that and it bleaked me out. Once upon a time I had those things, but when I converted it into PHP and started including everything, it got lost. The whole site is one big mess of bad coding really, will deffo see to all of this soon.

One thing I did notice is that the empty nodes are now pulling out "undefined" in everything but IE. I am sure I could find the answer online somewhere, but if you know off-hand how to get rid of them, that would be awesome!

http://juicenothing.com/best-albums-...no-work-ie.php

Thanks for your help dude, I am sending awesome vibes to you.
Back to top Go down
Momment
Member
Member
Momment

Posts : 19
Join date : 2011-03-09

Blank Nodes In IE Empty
PostSubject: Re: Blank Nodes In IE   Blank Nodes In IE EmptyMon Apr 18, 2011 9:03 pm

It's simple matter of standard HTML coding. No matter if you hard code the HTML elements or you write them using a server-side language, the general structure should be:

Doctype
(let's say <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">)
<html>
<head>
</head>
<body>
</body>
</html>

The head should nest the META tags and the CSS and JavaScript codes. The body will nest the content)

HTML, HEAD and BODY are not required by all means. They can miss, but within certain conditions. The safe way is to use them always. But the DOCTYPE is a must

I guess that simply adding

Code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"

or even the HTML5 declaration

Code:

<!DOCTYPE HTML>
will force IE to exit from quirksmode
Back to top Go down
Sponsored content




Blank Nodes In IE Empty
PostSubject: Re: Blank Nodes In IE   Blank Nodes In IE Empty

Back to top Go down
 

Blank Nodes In IE

View previous topic View next topic Back to top 
Page 1 of 1

 Similar topics

-
» How do you create blank space in HTML?

Permissions in this forum:You cannot reply to topics in this forum
Easy A :: Blank Nodes In IE Edit-trash Useless :: Trash-