[thelist] MSIE DOM annoying me again

Chris Heilmann lists at onlinetools.org
Mon Apr 4 07:53:28 CDT 2005


I am playing with the idea of an editor and ran into an odd MSIE problem:

http://www.icant.co.uk/sandbox/editor/

When you click the "+" buttons the whole form gets cloned and the IDs and
names changed:
				ps[i].getElementsByTagName('label')[0].htmlFor='c'+i;
ps[i].getElementsByTagName('textarea')[0].id='c'+i;
ps[i].getElementsByTagName('textarea')[0].name='c'+i;

The for and the ID attribute are no problem, but as you can see at the
control output, MSIE fails to rename the "name" attribute from c to c0:

<TEXTAREA id=c0 name=c>

Mozilla plays nicely.

Any fix?

Cheers,
Chris


-- 
Chris Heilmann
Blog: http://www.wait-till-i.com
Writing: http://icant.co.uk/
Binaries: http://www.onlinetools.org/



More information about the thelist mailing list