Forum Moderators: phranque

Message Too Old, No Replies

Validation error: No attribute 'name'

         

Cheshil

8:59 am on Nov 19, 2004 (gmt 0)

10+ Year Member



Hi there,

I just ran my form though the W3C validator and got the above error. Obviously the attribute 'name' is not allowed.

Is there any other way to use 'value' in the code below so it does validate? I am using this in conjunction with a javascript form validator.

onsubmit="return formcheck(this);" value="submit"

Many thanks
C

encyclo

12:20 pm on Nov 19, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Which doctype are you using, Cheshil? You can replace
name
with
id
to make it validate, but you would have to adapt your Javascript.

Usually the quickest and easiest way is to switch to a Transitional doctype, where the

name
attribute is still present.

Cheshil

1:28 pm on Nov 19, 2004 (gmt 0)

10+ Year Member



Hi there,

Thanks for the reply.

I am using strict doc.

Yes, maybe I should just change to transitional.

Many thanks

kaled

4:19 pm on Nov 19, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This was discussed in another thread.
If I remember correctly, the required doctype is 4.01 rather than 4.0

Kaled.