Menu

#6 Empty color table loaded

open
nobody
General (2)
5
2006-07-02
2006-07-02
g.difalco
No

In Internet Explorer, due to a known bug in the use of
responseXML method of the XMLHTTP object (ResponseXML
is not set if the server does not set
mimeType=text/xml), the color table is not loaded.

To fix the problem, I added two lines (marked with ***
ADDED) in the "palette" function in aiColor.htc:

function _palette( v ) {
palette = v;
var pals = palette.split( /\s*,\s*/ );
var http = new ActiveXObject( 'Msxml2.Xmlhttp' );
var doc = new ActiveXObject ('MSXML2.DOMDocument'
); // *** ADDED
http.open( 'GET', path + 'colors.xml', true);
http.onreadystatechange = function() {
if( http.readyState == 4 ) {
var doc = http.responseXML; doc.loadXML(
http.responseText) ; // *** ADDED
if( doc.xml ) {

............ etc etc ...........................

Discussion


Log in to post a comment.

MongoDB Logo MongoDB