my client has web app started throwing errors in ie10. tracked down source of error , seems ie 10 no longer supports selectsinglenode. here's function it's used:
scormapi.prototype.settom = function( tom ) { this.tom = createxmldocument(); var rootelem = importallnode( this.tom, this.tomtemplate.documentelement, true ); this.tom.appendchild( rootelem ); // transforms tracing of user in tracking template // perform navigation on nodes of tom , each value found // sets this.tom rootelem = tom.selectsinglenode('//cmi'); this.parsexml( rootelem, '/' , this, this.settomparam ); } it's called following code:
var ajxreq = new ajax.request( this.baseurl+'?op=initialize', { method: 'post', asynchronous:false, postbody: strsoap, requestheaders: { 'man':"post " + this.baseurl + " http/1.1", 'host':this.host, "content-type":"text/xml; charset=utf-8", "soapaction":this.serviceid + "initialize", "x-signature":playerconfig.auth_request } }); if( ajxreq.transport.status == 200 ) { try { this.settom( ajxreq.transport.responsexml ); } } i found suggestions change response type msxml-document, use queryselector or use jquery's find function, can't piece how implement in prototype framework. assistance appreciated.
as http://doogalbellend.blogspot.fr/2012/04/cross-browser-selectsinglenode-for-xml.html
update – no longer works in ie10, since selectsinglenode has been removed xml document returned ajax calls. can worked around setting response type of xmlhttprequest, :
xhr.responsetype = 'msxml-document';
modifying request adding responsetype: 'msxml-document' in options should work.
Comments
Post a Comment