3.0 beta 2

Problems with new versions of browsers (NS & Firefox)

Hello,

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

Gecko/20050729 Netscape/8.0.3.3
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.
Tuan
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)
{
if(name=="SelectionNamespaces"){
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);
}
Tuan
September 1,

This topic is archived.

See also:


Back to support forum

Search

Version 2

Looking for AW 2.6 ?
The old site is here.