473,406 Members | 2,390 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Uncaught Exception... I have no clue about.

Error: uncaught exception: [Exception... "Component returned failure code: 0x80004001
(NS_ERROR_NOT_IMPLEMENTED) [nsIDOM3Document.domConfig]" nsresult: "0x80004001
(NS_ERROR_NOT_IMPLEMENTED)" location: "JS frame ::
file:///D:/sites/_test/js/iterate_document.htm :: <TOP_LEVEL:: line 15" data: no]

Line 15 being:

s += j + ". " + i + ": " + document[i] + "<br />\n";

All the code:

s = '';
j = 1;
for (i in document)
{
s += j + ". " + i + ": " + document[i] + "<br />\n";
j++;
}

In Mozilla Firefox it prints a nice 136 item long list, but also throws that error up.
Can anyone explain to me what it means and why it popped up?

Many thanks in advance.

-Lost
Dec 21 '06 #1
5 3439
-Lost wrote on 21 dec 2006 in comp.lang.javascript:
s += j + ". " + i + ": " + document[i] + "<br />\n";
document cannot be an array or collection, methinks,
it is reserved for window.document.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Dec 21 '06 #2
"Evertjan." <ex**************@interxnl.netwrote in message
news:Xn********************@194.109.133.242...
-Lost wrote on 21 dec 2006 in comp.lang.javascript:
>s += j + ". " + i + ": " + document[i] + "<br />\n";

document cannot be an array or collection, methinks,
it is reserved for window.document.
I am no expert, but "document" is an object. The for/in loop can iterate its properties
and methods as such. As a matter of fact an object *is* a collection of named pieces of
data.

The for/in is essentially the same thing as a foreach in PHP.

As a last aside objects in JavaScript double as associative arrays. That is how we can
use things like:

document['lastModified']
window.frames['length']

....instead of document.lastModified or window.frames.length.

The code works, aside from throwing that exception. I have no clue either if it throws it
in the beginning or the end. I just know it throws it.

Thanks for the reply.

-Lost
Dec 21 '06 #3
-Lost wrote on 21 dec 2006 in comp.lang.javascript:
"Evertjan." <ex**************@interxnl.netwrote in message
news:Xn********************@194.109.133.242...
>-Lost wrote on 21 dec 2006 in comp.lang.javascript:
>>s += j + ". " + i + ": " + document[i] + "<br />\n";

document cannot be an array or collection, methinks,
it is reserved for window.document.

I am no expert, but "document" is an object. The for/in loop can
iterate its properties and methods as such. As a matter of fact an
object *is* a collection of named pieces of data.

The for/in is essentially the same thing as a foreach in PHP.

As a last aside objects in JavaScript double as associative arrays.
That is how we can use things like:

document['lastModified']
window.frames['length']

...instead of document.lastModified or window.frames.length.

The code works, aside from throwing that exception. I have no clue
either if it throws it in the beginning or the end. I just know it
throws it.

Thanks for the reply.

-Lost
Perhaps you are lost, but I think here you are right.

I [wrongly?] surmized you had redefined document, like:

var document= {}

od

var document= []

If you are still experiencing an error on this line,
perhaps expanding to more lines will narrow down the error location:

s += j;
s += ". ";
s += i;
s += ": ";
s += document[i];
s += "<br />\n";

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Dec 22 '06 #4
ASM
-Lost a écrit :
Error: uncaught exception: [Exception...
(...)
All the code:

s = '';
j = 1;
for (i in document)
{
s += j + ". " + i + ": " + document[i] + "<br />\n";
Probably better with :

s += j + ". " + i + ": " + document[i] + "<br \/>";
j++;
}


--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date
Dec 23 '06 #5
"-Lost" <sp****************@REMOVEMEcomcast.netwrote in message
news:Qu******************************@comcast.com. ..
Error: uncaught exception: [Exception... "Component returned failure code: 0x80004001
(NS_ERROR_NOT_IMPLEMENTED) [nsIDOM3Document.domConfig]" nsresult: "0x80004001
(NS_ERROR_NOT_IMPLEMENTED)" location: "JS frame ::
file:///D:/sites/_test/js/iterate_document.htm :: <TOP_LEVEL:: line 15" data: no]

Line 15 being:

s += j + ". " + i + ": " + document[i] + "<br />\n";

All the code:

s = '';
j = 1;
for (i in document)
{
s += j + ". " + i + ": " + document[i] + "<br />\n";
j++;
}
Boy, this sure is an old thread. Anyway, I ended up figuring this error out. Whilst
fiddling with assigning Object methods and properties to arrays and objects (just
crunching numbers), I noticed you get similar "property denied" errors on a lot of
interfaces.

For example the XMLHttpRequest Object does not allow direct access to its channel
property; and in another turn nsIDOM3Document.domConfig did not allow access to the
Document object's domConfig property.

By simply testing for these you can avoid the error (if you are a stickler).

for (i in document)
{
if (i != 'domConfig')
{
// do something with i, document
}
}

The same holds true for the XMLHttpRequest. Test against 'channel', and you alleviate the
error.

No clue what purpose this serves, if any.

-Lost
Apr 4 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: nrhayyal | last post by:
hi all, i am facing a problem in catching an exception which is uncaught in any of the catch block. not doing so will gives me coredump. I tried by rewriting set_unexpected() and set_terminate()...
7
by: meaneyedcat | last post by:
When I call addField(), my table appears to be populated correctly with a new row in the table with all the required fields. However, when I call delete row on any new rows that have been created,...
3
by: c.prerovsky | last post by:
Hi there, I started messing around with JavaScript OOP a few days ago and still can't get this one to work. There are many things wich keep confusing me, eg. the various ways to define a class...
2
Plater
by: Plater | last post by:
I am using the XMLHttpRequest to send a request every 5ish seconds or so. Everything works fine until I take the server down that the object is trying to retrieve data from. Then the firefox...
9
by: xhunter | last post by:
Hi, I have written my code to load some content through ajax, which works perfectly, then I thought of adding a timeout to retry the action in case it has failed or something. here is the code...
3
by: George2 | last post by:
Hello everyone, Just want to check whether my understanding is correct, Both (1) and (2) only covers Windows C++ platform. 1. If there is uncaught exception, destructor is not ensured to...
2
by: josephx | last post by:
Hello, I got some of these errors listed below after executing an HTTP Post MIDlet on CLDC/MIDP platform, "Nokia S40 DP 2.0 SDK 1.1" and "S40 5th Edition SDK Feature Pack 1" and even for S60's...
3
by: friend | last post by:
Error: uncaught exception: " nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://manimekalai/VulnMgmt/scanfi/crs_source/vulnupdate/latest.php?vulnerability=2451 ::...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.