IE error on Slick.search

32 views
Skip to first unread message

justind

unread,
Dec 23, 2010, 11:46:25 AM12/23/10
to MooTools Users
Hello,

I have some code to check if my xml results are an error:

var err = Slick.search(result, 'error');

IE 8 throws: "Object Required" on line 2048, char 2 (in mootools.1.3
http://mootools.net/core/7c56cfef9dddcf170a5d68e3fb61cfd7)

The error is here:

local.isXML = function(document){
return (!!document.xmlVersion) || (!!document.xml) ||
(Object.prototype.toString.call(document) === '[object XMLDocument]')
||
(document.nodeType === 9 && document.documentElement.nodeName !==
'HTML');
};

All of the boolean checks fail in that sequence until the last where
document.documentElement.nodename seems to be the offending bit.

the value of document.documentElement is null.
The IE debugger lists its type as IXMLDOMElement.
typeof returns object
Mootools typeOf() returns 'null'.

According to the IE debugger document is of the type IXMLDOMDocument2
and seems to be a perfectly well formed XML Document. The code is
working fine in FF and Chrome.

Any idea why I might be getting this error? Is it a slick bug, or
something I'm doing? The raw string that is returned along with the
XML document looks like this: https://gist.github.com/753229

Thanks,
Justin

Sanford Whiteman

unread,
Dec 24, 2010, 1:37:44 AM12/24/10
to justind
Think I'd need to see more of a runnable example. I don't get an IE
error that early here:

http://jsfiddle.net/sanford/3Uq64/

You will eventually run into problems calling certain HTMLElement-only
methods if you don't namespace your XML for IE, but that's later than
the initial Slick.search().

-- Sandy

Fábio M. Costa

unread,
Dec 24, 2010, 4:12:10 PM12/24/10
to mootool...@googlegroups.com
Mootools typeOf is saying the response is null.... it could be a wrong content type on your xml response.
 
Can you tell us whats the content-type value?
It needs to be text/xml or something (don't remember exactly)
Globo.com
github: fabiomcosta
twitter: @fabiomiranda
ramal: 6410



justind

unread,
Dec 28, 2010, 11:55:32 AM12/28/10
to MooTools Users
The response content type is text/xml.

If anyone cares to look, The page is here: http://yestertemp.com

You may be prompted by the browser for your location. If you're not in
the US, deny it and enter a zip code like 10003.

The slick query is called on line 214 of deletabrrrk.js.

The problem only occurs in IE (I'm using 8).

Thanks again.
Justin


On Dec 24, 4:12 pm, Fábio M. Costa <fabio.co...@corp.globo.com> wrote:
> Mootools typeOf is saying the response is null.... it could be a wrong
> content type on your xml response.
>
> Can you tell us whats the content-type value?
> It needs to be text/xml or something (don't remember exactly)
> Globo.com
> *github:* fabiomcosta
> *twitter:* @fabiomiranda
> *ramal:* 6410

Thomas Aylott

unread,
Dec 31, 2010, 6:46:20 PM12/31/10
to justind, MooTools Users
I made a Slick.js issue for it and added my comments there.

I watch that much more closely than the ML.

https://github.com/mootools/slick/issues/#issue/15


— Thomas Aylott – SubtleGradient – MooTools – Slick.js Lead Dev – Cloudera —

Fábio M. Costa

unread,
Jan 16, 2011, 12:49:54 PM1/16/11
to mootool...@googlegroups.com, justind
Justin,

Please check my response to see if that solves your problem.

Looks like the problem is not on Slick.

https://github.com/mootools/slick/issues#issue/15

--
Fábio Miranda Costa
frontend@portalpadroes

Globo.com
github: fabiomcosta
twitter: @fabiomiranda
ramal: 6410



Reply all
Reply to author
Forward
0 new messages