Topic: Firefox java problems

I've stumbled across a javascript problem when making the Plugin Manager/Uploader. In Opera and IE this page works just fine, but Firefox can't handle it.

The code used is essentially the one below. The problem is that I get "undefined" as value in firefox. It seem like it's using id's "1,3,5,7,9,..." instead of "0,1,2,3,4,..." when stepping through the items. Does someone know what's wrong?

var row = document.getElementById(name);
document.forms[0].area.value = row.childNodes.item(0).innerHTML;

I've put an full example page here: http://www.etek.chalmers.se/~e0mool/pun … error.php4

Re: Firefox java problems

I suggest you use the DOM inspector (ctrl+shift+i) in FF to find out what's wrong. With that you can kind of "debug" JavaScript by looking at what elements all objects on the page contain.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: Firefox java problems

Rickard wrote:

I suggest you use the DOM inspector (ctrl+shift+i) in FF to find out what's wrong. With that you can kind of "debug" JavaScript by looking at what elements all objects on the page contain.

PERFECT! The all-knowing Rickard strikes again! Why didn't I find "The DOM" earlier :)

Problem solved now, I'm using "row.cells" instead of "row.childnodes".