Odd BUG in FF

P

Phat G5 (G3)

I ran across this and have submitted it to Mozilla but I thought I'd run it
past you all to see if you had seen it before and if I may be having a brain
far or what. On the url:

http://steffan.hldns.com:85/mozilla/add_remove_form_fields.lasso

Click the add field button a few times then submit the form. On the response
form you will see player_name_0 ... player_name_01 ... player_name_012
Well, that is wrong. It should have been
player_name_0 ... player_name_1 ... player_name_2
It works this way with IE PC and Safari. So why is FF doing it differently?
Essentially this is what FF does
Integer++ is equal to someInteger.toString() + someInteger.toString()
What is the deal. If you view source on the page you'll see where I
initialize var counter=0 and the counter++

Any ideas for a work around?

-S
 
R

RobG

Phat said:
I ran across this and have submitted it to Mozilla but I thought I'd run it
past you all to see if you had seen it before and if I may be having a brain
far or what. On the url:

http://steffan.hldns.com:85/mozilla/add_remove_form_fields.lasso

Click the add field button a few times then submit the form. On the response
form you will see player_name_0 ... player_name_01 ... player_name_012
Well, that is wrong. It should have been
player_name_0 ... player_name_1 ... player_name_2
It works this way with IE PC and Safari. So why is FF doing it differently?
Essentially this is what FF does
Integer++ is equal to someInteger.toString() + someInteger.toString()
What is the deal. If you view source on the page you'll see where I
initialize var counter=0 and the counter++

Any ideas for a work around?

No work around required. You are creating divs with duplicate IDs, the
results of which are inconsistent.

Change your code to either remove the id of cloned divs or make it
unique in the page:

var newFields = document.getElementById(loc
+ 'readroot').cloneNode(true);
newFields.style.display = 'block';
// Now remove the id or set it to some unique value
newFields.id = '';
 
P

Phat G5 (G3)

No work around required. You are creating divs with duplicate IDs, the
results of which are inconsistent.

Change your code to either remove the id of cloned divs or make it
unique in the page:

var newFields = document.getElementById(loc
+ 'readroot').cloneNode(true);
newFields.style.display = 'block';
// Now remove the id or set it to some unique value
newFields.id = '';
Yep, that fixed it. If you are registered on Bugzilla at mozilla.org you
will see an interesting thread over this.

Thanks

-S
 
R

RobG

Phat said:
Phat said:
I ran across this and have submitted it to Mozilla but I thought I'd run it
past you all to see if you had seen it before and if I may be having a brain
far or what. On the url:

http://steffan.hldns.com:85/mozilla/add_remove_form_fields.lasso
[...]
No work around required. You are creating divs with duplicate IDs, the
results of which are inconsistent.

Change your code to either remove the id of cloned divs or make it
unique in the page:
[...]

Yep, that fixed it. If you are registered on Bugzilla at mozilla.org you
will see an interesting thread over this.

It would have been helpful to supply a link, bug number, summary text or
keywords. You don't have to be registered at Bugzilla to view bug
reports. For anyone who cares, it's 324482.

<URL:https://bugzilla.mozilla.org/show_bug.cgi?id=324482>


The solution was posted here on C.L.J. before it was posted on Bugzilla
(by 20 minutes). It's hardly an interesting discussion - I'd
characterise it as confused.

The bottom line is that you were creating invalid markup. How different
browsers respond to that is arbitrary. That Firefox responds
differently to some other browsers is not surprising.

It is not a bug, it is poor coding.

[...]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,130
Latest member
MitchellTe
Top