-1

I have 12 errors, but some are just pure non existent. I'm using the smarty templating engine.

Doctype:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Here's the error report, but the "duplicate specification of attribute "value"" simply isn't true according to my .tpl: jsfiddle of .tpl here

{textfield class="quetext" value="Epost*" onblur="if(this.value=='') 
this.value='Epost*';" 
onfocus="if(this.value=='Epost*') this.value='';"}

Also, does a textarea require the attribute "rows" and "cols"? I thought that was only for tables?

And I don't understand what the two errors at the end mean:

Line 586, Column 80: Attribute value redefined... 

Please help!

Thanks :)

(Sorry if things chop and change, I'm working on the valdiation now, to tidy up as many errors as possible.)

3
  • I would suggest separating your JS from your HTML using an external script file. It should make it a little easier to work with the validation process. Commented May 18, 2010 at 8:23
  • I'd suggest going further and not using the default value as a substitute <label>. It's semantically wrong and impossible for screen reader users to access (element gets focus, "label" goes away, nothing for the screen reader to read out). Commented May 18, 2010 at 8:28
  • I shall try to separate that JS now. Commented May 18, 2010 at 8:41

1 Answer 1

2

the "duplicate specification of attribute "value"" simply isn't true according to my .tpl:

The validator is only looking at your output. You have the value attribute in there twice, no matter what you .tpl says.

Also, does a textarea require the attribute "rows" and "cols"?

Yes

I thought that was only for tables?

Tables don't have those attributes at all

Line 586, Column 80: Attribute value redefined...

You have, in essence: <foo value="something" value="something">

This is the same problem as before, except it is the error on the second one rather than the first.

Sign up to request clarification or add additional context in comments.

4 Comments

Don't be absurd, <foo> isn't a real HTML element ;-)
Thanks, added cols and rows. About the value="" how would I prevent another value being added? What is inserting this new value?
I don't know what template language you are using, let alone how it works.
Still don't know how it works. I haven't touched PHP for anything but the most trivial toy scripts for over half a decade.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.