:: Forum >>

Cannot display grid with mozilla/firefox 1.6

I cannot view the grid examples on activewidgets when I use mozilla/firefox 1.6 (from linux), I have all the javascript options turned on so it isn't that

any clues ?
thank you
kevinM
Thursday, May 13, 2004
Can you please tell a little bit more of the problem:
- are you using 0.3.2 release
- which exactly files you look at
- are you opening files from the filesystem or web server
- activewidgets.com or your own
- do you have any errors in Mozilla javascript console?
Alex (ActiveWidgets)
Friday, May 14, 2004
Alex, I have the problem both looking at my own (internal) website and at the activewidgets one

javascript console reports

Error: uncaught exception: [Exception... "Object cannot be created in this context" code: "9" nsresult: "0x80530009 (NS_ERROR_DOM_NOT_SUPPORTED_ERR)" location: "<unknown>"]

Error: Active.Controls.Grid is not a constructor
Source File: http://www.activewidgets.com/examples/grid/basic.htm
Line: 58 ( var obj = new Active.Controls.Grid;)

thank you for your help
kevinM
Wednesday, May 19, 2004
Kevin,

sorry, I cannot replicate this. I am using Red Hat 9 and tried Mozilla 1.6, Firefox 0.8 and several older versions - all of them work fine.

Do you have the same problem with other Mozilla versions?
Is there anything special with your Linux install?
Alex (ActiveWidgets)
Wednesday, May 19, 2004
It seems that my installtion of mozilla was at fault, removing it and installing from ximian fixed this issue - sorry for creating a red herring
KevinM
Wednesday, June 2, 2004
Update : it was firefox that was at fault. Installed mozilla & grid worked fine, added the firefox prm and it broke again!! So removed firefox and it worked OK with mozilla again, so something in firefox breaks mozilla for this (and some other) javascript
KevinM
Friday, June 4, 2004
Is it possible to check what's going wrong with FireFox? I can see lots of people are using FireFox now( it is light, user friendly and fast! ).
Li Ma
Thursday, October 14, 2004
I'm having a similar problem with Mozilla Firefox but I have verified that the following DOES work:

http://www.activewidgets.com/examples/grid/basic.htm

When using my data I get the following error:

Active is not defined

If I take the above example, which does work, and change only the following then it quits workking with the above error:

<!-- ActiveWidgets stylesheet and scripts -->
<link href="JavaScript/ActiveWidgets/runtime/styles/xp/grid.css" rel="stylesheet" type="text/css" ></link>
<script src="JavaScript/ActiveWidgets/runtime/lib/grid.js"></script>

This problem is only apparent with Firefox, not IE.
Paul
Monday, November 1, 2004
I'm currently experiencing this issue. Using debugging tools I've discovered it's an issue with the table.js.
xml = window.ActiveXObject ? new ActiveXObject("MSXML2.DOMDocument") : new XMLDocument;

Exception is:
Exception ``[Exception... "Object cannot be created in this context" code: "9" nsresult: "0x80530009 (NS_ERROR_DOM_NOT_SUPPORTED_ERR)" location: "<unknown>"]'' thrown from function anonymous(xml=string:8653 characters) in <http://localhost/source/lib/xml/table.js> line 61.

Is "new XMLDocument" supported by Firefox?

I've tried to fix this using other methods.

if (!xml.nodeType) {
    var s = "" + xml;
    if (window.ActiveXObject)
    {
        xml = new ActiveXObject("MSXML2.DOMDocument")
    }
    else if(document.implementation && document.implementation.createDocument)
    {
        xml = document.implementation.createDocument("","", null);
    }
    //xml = window.ActiveXObject ? new ActiveXObject("MSXML2.DOMDocument") : document.implementation.createDocument("","", null);
    xml.loadXML(s);
}


Based on http://www.webreference.com/programming/javascript/domwrapper/2.html

But it then breaks elsewhere in the process and I'm not too familar with the code base.

I will continue to attempt a fix.
Stephane
Sunday, March 13, 2005
Another great article about loading XML into a Gecko-based browser....
http://www.builderau.com.au/program/0,39024614,39128985,00.htm
Stephane
Sunday, March 13, 2005
Looks like I have succeeded!

Alex, I'm not sure if this affects other portions of your codebase, but i've tested both fixes with IE6 and Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050225 Firefox/1.0.1

I will be purchasing your component as soon as i've completed testing it's full functionality. If you could please let me know if this breaks compatibility or if you have a better fix I would great appreciate it.

Stephane



If you use this:
if (!xml.nodeType) {
    var s = "" + xml;
    
    if (window.ActiveXObject)
    {
        xml = new ActiveXObject("MSXML2.DOMDocument");
        xml.loadXML(s);
    }
    else if(document.implementation)
    {
        var parser = new DOMParser();
        xml = parser.parseFromString(s,"text/xml");
    }
}



I also ran into an issue when a node is in the XML but has no value.

These are my two fixes.
xml/table.js
Line 188

Origainal:
var data = node ? node.text : "";

New:
var data = (node ? (node.text ? node.text : "") : "");

--

browsers/gecko.js
Line 290

Original:
element.__defineGetter__("text", function(){return this.firstChild.nodeValue});

New:
element.__defineGetter__("text", function(){ if(this.firstChild) return this.firstChild.nodeValue; else return ""; });
Stephane
Sunday, March 13, 2005
Great Stephane!

I glitched arround for the solution and ended up in workarrounds in my servers backend code in combination with a Active.Format derived class setting a text value of &nbsp; if the node was empty.

Hello Alex!

This would realy be worse putting it in a 1.0.1 bugfix release.

Any plans on doing this?

Is there a way to release it as a patch?

Thank you....
Dietrich
Monday, March 14, 2005
I've actually had to change it again because it didn't render properly in Firefox with a blank cell.

xml/table.js
Line 188
var data = (node ? (node.text ? node.text : "&nbsp;") : "&nbsp;");
Tuesday, March 15, 2005
Sorry, newbie question.
When you make changes to files in the source folder as above, how do you redistribute or compile(?) changes to the runtime folder?
I'm assuming all u need in your application is the runtime folder and not the source folder .... or am i totally wrong in my understanding.


newbie
Thursday, September 1, 2005

This topic is archived.


Back to support forum

Forum search