Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
10-11-2008, 06:06 PM #1
- Join Date
- Feb 2006
- Thanked 0 Times in 0 Posts
Problem with Id and name as form attributes
I have a form like this:
<form method="post" action="/account/register" id="registrationform" name="registration">
The problem is that if I am to follow strict XHTML guidelines I should be using either name or id but not both... any ideas?
10-12-2008, 02:19 AM #2
Assuming 'countryCode' is a text element, you can access its value by:
in place of the 'document.registration.countryCode.value'
<input type="text" id='countryCode' name='countryCode' value='USA'>