Hi all

We at the Zope3 dev mailinglist have a question to
you genious JQuery developers. We run into a IE 6&7 issue
related to DOM element id and name.

The following two onclick handler return both
Bar as value in IE 6 and 7. Does anybody know why?

<html>
<head><title>test</title></head>
<body>
  <form>
    <input type="submit" name="foo" id="bar" value="Bar" />
    <input type="submit" name="baz" id="foo" value="Foo" />
  </form>
  <span onclick="javascript:alert(document.getElementById('bar').value)">bar
(ok)</span>
  <span onclick="javascript:alert(document.getElementById('foo').value)">foo
(problem on IE 6 & 7)</span>
</body>
</html>

What rule whould you recommend for generate
id and name attributes for a framework which 
generates input fields, buttons etc.

In the new form framework we are developing right now,
do we generate element id and name values like:

id="form-widgets-lastname" name="form.widgets.lastname""

Is this acceptable or is there any reason using another 
naming convention for element ids and names?

Thanks for any hint.

Regards
Roger Ineichen
_______________________________________________
Zope3-dev mailing list
[EMAIL PROTECTED]

Reply via email to