AW: [Zope3-dev] Re: [Checkins] SVN: z3c.form/trunk/src/z3c/form/ HTMLelement ids containing dots are not very good, because then the

Roger Ineichen dev at projekt01.ch
Thu Jun 14 18:54:30 EDT 2007


Hi Gary

> Betreff: [Zope3-dev] Re: [Checkins] SVN: 
> z3c.form/trunk/src/z3c/form/ HTMLelement ids containing dots 
> are not very good, because then the

[...]

> > If you can send me a z3c.form-based form that does not behave 
> > correctly in IE6, I will be more than glad to revert this 
> change and 
> > find another solution to the problem.
> 
> I won't have time to do that anytime very soon.  We 
> encountered this problem again very recently actually.  
> Here's a very small test case.  Works correctly on Firefox, 
> breaks on IE 7(!).

I see, that's a known bug in IE.

<input type="submit" name="foo" id="bar" value="Bar" />
<input type="submit" name="baz" id="foo" value="Foo" />

Using the same id and name in different elements
ends in IE with getting the first element with that
id or name. This means getElementById('foo') will 
return the first element found with the given 
name="foo" or id="foo".

The z3c.form framework avoids this perfectly because it
generates element names and ids like:
id="form-widgets-lastname" name="form.widgets.lastname""
This will make sure that we never generate equal names 
and ids for all form elements.

Regards
Roger Ineichen




More information about the Zope3-dev mailing list