I am modifying the ID of an html div element client side with JavaScript. The following code works OK in Internet Explorer but not in FireFox.
document.getElementById('one').id = 'two';
Can anyone tell me:
a) Why this doesn't work in FireFox.
b) How to make this work in FireFox.
EDIT
To clarify, i'm changing the element ID to reference a different style in an external style sheet. The style is applied in IE but not FF.
EDIT
Turns out the page was been viewed in Firefox/2.0.0.20. So how do i make this work in the old FF version?
Thanks