Alas, there are a variety of MS script debugger versions out there.
There's one that allows you to set breakpoints.
In this case, I think the thing you probably wanted to do was:
1) Use the MochiKit interpreter demo to put a place in your page to
experiment.
2) Add a line in your code to assign responseXML to the window or
some global place.
This would allow you go type interactive commands and speed up the
trial-and-error process. Also, perhaps one of the IE extensions/
bookmarklets that mimic the DOM Inspector might have helped, once you
assigned it to a reachable place.
--Paul
On Mar 15, 2006, at 2:29 PM, Ryan Hagan wrote:
> Is that the normal code built-in to IE or would that be an add-on?
> If you've got any tools that would help me debug Javascript better
> in IE, I'm all ears. I've tried several, but I haven't seen any
> that aren't completely worthless. Even ones cost money.
>
> The built-in JS debugger did not throw an error on the code
> mentioned above. Or maybe it did, actually, but the error it threw
> specified a different file and a different line number than that
> line was in. Go figure.
>
> Thanks.
>
>
> On 3/14/06, troels knak-nielsen <[EMAIL PROTECTED]> wrote:
> hm ... Without trying it out though, it does occur to me that ms
> script debugger would be able to track this down ? Did you try that ?
> (Not to rub it in or anything...)
>
> On 3/14/06, Ryan Hagan < [EMAIL PROTECTED]> wrote:
> > So, basically the entire problem was right here:
> >
> >
> > ajaxResponse.processWhen =
> > xmlDoc.getElementsByTagName('ajax')[0].attributes.process
> > .value;
> >
> >
> > That works fine in Firefox, but IE needs to use this:
> >
> > ajaxResponse.processWhen =
> > xmlDoc.getElementsByTagName('ajax')[0].getAttribute('process');
> >
> >
> > Thanks to IE's complete lack of meaningful JS error messages (or
> lack
> > thereof), it took me the better part of two days to track this down.
> >
> >
> >
> > On 3/13/06, Ryan Hagan <[EMAIL PROTECTED]> wrote:
> > >
> > > Greetings,
> > >
> > > I'm having some problems with the responseXML property after
> running an
> > XMLHttpRequest. Find code and response documents below.
> > >
> > > The problem is that in Firefox, the code works great. But in
> IE, the
> > responseXML property is empty. The responseText property has the
> entire
> > document as a string, but that doesn't help me much. I really
> need the DOM
> > functions in order to parse the response XML document. I've
> verified that
> > the resultant document is a valid XML file by using IE to load
> the response
> > document directly. IE parses the document correctly and displays
> it as an
> > XML document.
> > >
> > > If I check the headers inside of the callback function in IE,
> it properly
> > tells me that the document is "text/xml".
> > >
> > > I've been working on this all day long and I am no closer to
> solving this
> > than when I started. I'm begging for help. Thanks.
> > >
> > >
> > >
> > >
> > > loadXMLDoc = function(url, qs)
> > > {
> > > // open custom XMLHttpRequest object
> > > var req = getXMLHttpRequest();
> > >
> > > if (req.overrideMimeType)
> > > {
> > > // override the mime type to set it to XML
> > > req.overrideMimeType("text/xml");
> > > };
> > >
> > > // loop over the qs object and create a string
> > > for( myItem in qs )
> > > {
> > > url += '&' + myItem + '=' + qs[myItem];
> > > }
> > >
> > > // open the request
> > > req.open("GET", url, true);
> > >
> > > // send the info
> > > return sendXMLHttpRequest(req);
> > > };
> > >
> > > And my callback function looks like this:
> > >
> > > callback = function(res) {
> > > if ( res.getResponseHeader('Content-type') == 'text/
> xml' ||
> > res.getResponseHeader('Content-type') == 'application/xml' )
> > > {
> > > log('headers: ' + res.getAllResponseHeaders());
> > > log(' res.responsXML: ' + res.responseXML);
> > > log('res.responsText: ' + res.responseText);
> > > log('Parse Error?: ' + res.responseXML.parseError);
> > > var xmlDoc = res.responseXML;
> > > var ajaxResponse = new Object();
> > >
> > > ajaxResponse.processWhen =
> > xmlDoc.getElementsByTagName ('ajax')[0].attributes.process.value;
> > > ajaxResponse.html = xmlDoc.getElementsByTagName
> ('html');
> > > ajaxResponse.json = xmlDoc.getElementsByTagName
> ('json');
> > > ajaxResponse.js = xmlDoc.getElementsByTagName('js');
> > >
> > > // call original
> > > if (!MochiKit.Async.freezeAll) {
> > > this._callback(ajaxResponse);
> > > }
> > > }
> > > }
> > >
> > >
> > > And here's my response document (it's a php file):
> > > <?php
> > > header("Content-type: text/xml");
> > > echo '<?xml version="1.0" encoding="iso-8859-1"?>';
> > > ?>
> > > <ajax process="delayed">
> > > <html output="mydiv">
> > > <strong>Hello World!</strong>
> > > </html>
> > > <js></js>
> > > <json></json>
> > > </ajax>
> > >
> > >
> > > The log response looks like this:
> > > INFO: headers: X-Powered-By: PHP/4.4.1X-Zend-WinEnabler:
> 1.2.0Keep-Alive:
> > timeout=15, max=88Transfer-Encoding: chunkedContent-Type: text/xml
> > > INFO: res.responsXML:
> > > INFO: res.responsText: <?xml version="1.0"
> encoding="iso-8859-1"?><ajax
> > process="delayed"> <html output="mydiv"> <strong>Hello World!
> </strong>
> >
> >
>
>
> --
> troels
>
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"MochiKit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/mochikit
-~----------~----~----~----~------~----~------~--~---