Problems with new versions of browsers (NS & Firefox)


I tried to use NS and Firefox browsers with version no.:

Gecko/20050729 Netscape/
Gecko/20050716 Firefox/1.0.6

It seems that setProperty method (add-ins by GECKO.JS) only works one or does not even work... Well, I got this error message:

setProperty is not a function

So it seems that Document object (returned by XMLHTTP result) is not fully supported when running the new versions.

Anyone helps me pls.
September 1,
Probably there is something to do with those new Browsers...
I tested and assumed that we could not rely on the one-shot initialization of missing methods for Mozilla, especially, the troublesome one "setProperty" when we include gecko.js

I decided to call this everytime I need to parse XML document with Namespaces, anyway, so far this works for my purpose...
I hope there is a better way.

var oDoc = result.documentElement.ownerDocument;

if (typeof(oDoc.setProperty)=='undefined')
oDoc.setProperty = function(name, value)
namespaces = {};
var a = value.split(" xmlns:");
for (var i=1;i<a.length;i++){
var s = a[i].split("=");
namespaces[s[0]] = s[1].replace(/\"/g, "");
this._ns = {
lookupNamespaceURI : function(prefix){return namespaces[prefix]}

oDoc._ns = {
lookupNamespaceURI : function(){return null}

if (typeof(oDoc.setProperty)!='undefined')
oDoc.setProperty("SelectionLanguage", "XPath");
oDoc.setProperty("SelectionNamespaces", ns);
September 1,

This topic is archived.

See also:

Back to support forum