3.2.0

FireFox 1.0.3 not working (cannot show grid)

Hello All,

I took one of the very first example and try to put it in my web server for testing (see below). I put this code in a JSP file. This JSP shows up correctly in IE but does not show up in FireFox 1.0.3 (and 1.0, have not tried 1.0.2 and can't seem to find it online anymore).

Can anyone provide some insight on why it does not work on FireFox??
(Note the runtime directory is at the right place because IE has no problem showing the page) Thanks.

I am running on XP.

Grace


<html>
<head>
<title>ActiveWidgets Example</title>
<!-- ActiveWidgets stylesheet and scripts -->
<link href="/sbm/runtime/styles/xp/grid.css" rel="stylesheet" type="text/css" ></link>
<script src="/sbm/runtime/lib/grid.js"></script>
<style>
* {-moz-box-sizing: border-box;}
html { width: 100%; height: 100%; margin: 0px; padding: 0px; overflow: hidden}
body { width: 100%; height: 100%; margin: 0px; padding: 50px; overflow: hidden; font: menu}
.active-controls-grid {border: 1px solid #ccc}
</style>
<script>
window.focus();
</script>

</head>
<body>
<script>

// data source
var myData = [
["text1", 123.45],
["text2", 678.90]
];

// create grid object
var obj = new Active.Controls.Grid;

// set number of columns/rows
obj.setColumnCount(2);
obj.setRowCount(2);

// link to cell text
obj.setDataText(function(i,j){return myData[i][j]});

// write control to the page
document.write(obj);

</script>
</body>
</html>

Frustrated Grace
April 19,
It worked in 1.0.2 but doesn't work now in 1.0.3. The error is:

Error: uncaught exception: [Exception... "Illegal operation on WrappedNative prototype object" nsresult: "0x8057000c (NS_ERROR_XPC_BAD_OP_ON_WN_PROTO)" location: "JS frame :: file:///D:/Code/JavaScript/ActiveWidgets/runtime/lib/grid.js :: anonymous :: line 15" data: no]
KDC
April 19,
Grace,

I would suggest checking JavaScript console - if it shows any errors. Also check that gecko.xml is available in runtime/styles/xp directory and is sent with Content-type: text/xml

Alex (ActiveWidgets)
April 19,
KDC,

I believe your error is of different nature and is related to FF 1.0.3 bug #290777 - see this thread for more details:

http://www.activewidgets.com/javascript.forum.4524.12/new-bug-with-firefox-1.html

link to FF bug:

https://bugzilla.mozilla.org/show_bug.cgi?id=290777
Alex (ActiveWidgets)
April 19,
Incidentally, the examples that don't work are:

xml - array of records.htm
xml - data island.htm
xml - dataset.htm
xml - simple.htm

Methinks I see a trend.
The simple.htm throws the following error:

Error: uncaught exception: [Exception... "Illegal operation on WrappedNative prototype object" nsresult: "0x8057000c (NS_ERROR_XPC_BAD_OP_ON_WN_PROTO)" location: "JS frame :: file:///c:/Documents%20and%20Settings/username/directory/ActiveWidgets/runtime/lib/browsers/gecko.js :: anonymous :: line 282" data: no]
KDC
April 19,
Hi All,

Wow, quick responses!

Here are some of the answers -
1. From my FF browser->Tools->JavaScript console, no error is displayed
2. gecko.xml is in runtime/styles/xp directory (the same way as extracted from the product zip file)

I will check the related threads for details. Thanks.

Grace

Frustrated Grace
April 19,
One more thing, if I go to www.activewidgets.com, all the examples are showing up correctly on FF. Could this be related to the web server that is serving these pages?

I am using a web container that comes with an application server called Pramati (this app server is bundled with my company's product).

Thanks
Grace
Frustrated Grace
April 19,
Grace,
it could be related to web server configuration (mapping between file extension and content-type header) check that gecko.xml is sent as Content-type: text/xml and not just text.
Alex (ActiveWidgets)
April 20,
Alex,

Where should I check the content-type setting? In the web server? Thanks.

Frustrated Grace
April 20,
Grace,

You can check what content-type Firefox is seeing by loading the xml page (i.e. http://your.domain/path/to/runtime/styles/xp/gecko.xml ) , then hitting Tools, Page Info. The "Type:" line will show you what was sent by the server.
Scott R. Keszler
April 21,
I've tracked down why it doesn't work on my site.

I can't have my doctype at the top of any page that uses the grid.
Here's mine:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Why?! Very wierd.
david
April 21,
David,

see javascript.forum.3095.0/standards-compliant-mode-not-supported.html
Scott R. Keszler
April 21,
I'm using firefox. This sounds IE specific.
david
April 21,
Workaround for FireFox 1.0.3 problems is included into ActiveWidgets 1.0.1 release
Alex (ActiveWidgets)
May 11,
Hi Alex,

I'm using ActiveWidgets 1.0.1, on an apache server
As you have mentioned in the comments above, my webserver is returning gecko.xml as text. I cannot change httpd.conf and hence do not have control over the content-type.

Is there someway I can get it to work on Firefox (1.0.6). It works great on IE. Thanks for the wonderful widget.
Shivanand Velmurugan
August 22,
I am having the same issue with the webserver (returning gecko.xml as text not xml). Has there been a solution to getting it to work in Firefox (1.0.7)?

Thanks
October 19,

This topic is archived.

See also:


Back to support forum