PDA

View Full Version : name attribute in form tags deleted in RC3 ?



vfuchs
Aug 29th, 2006, 02:07 AM
Hi all,

It seems the name attribute for the form tag <form> has been deleted, according to the the TLD file. However, the changelog between RC2 and RC3 doesn't mention it. Does anybody know why ?

For those who have HTML forms identified by "name" attribute on which javascript functions are related, you can't access your forms directly anymore through

document.myForm.elements.element.doSomething
You now have to identifiy your forms with "id" attribute, and go through

var myForm=document.getElementById('myForm');
myForm.elements.element.doSomething


hope this helps

--
Vincent

jpederzolli
Aug 31st, 2006, 02:55 PM
Im guessing because name is not a valid XHTML 1.1 form attribute...

http://learningforlife.fsu.edu/webmaster/references/xhtml/tags/forms/form.cfm