Validation

C

Captain Dondo

I ran my site through the html validator....
http://validator.w3.org/check?uri=h...etect+automatically)&doctype=XHTML+1.0+Strict

I am requesting strict validation. I have a couple of interprettion
questions on the results.

I have a whole bunch of <a href="JavaScript:void(0)"
onClick="JavaScript:window.open('... type statements. The validator
tells me that for a specific line there is no 'onClick' attribute.... I
can't for the life of me find anything special about that one line, and
why it is picking on that line and not the 40 or 50 other similar lines
on that page...

Ditto for <div class="feedback" align="right"> - it doesn't like the
aligh="right" but again, only once and not the other 50 times it appears....

What am I missing here?

(OK, I know further down the page there is a whole bunch of broken
stuff. I am just trying to fix the new(er) entries, not the whole blog.)
 
B

Barbara de Zoete

Ditto for <div class="feedback" align="right"> - it doesn't like the
aligh="right" but again, only once and not the other 50 times it appears....

What am I missing here?

IIRC the valitator doesn't repeat the exact same error in one page. So if you
correct this one error it will notice the next occurence and so on and so on,
till you've actually corrected all 50 of them.

--
,-- --<--@ -- PretLetters: 'woest wyf', met vele interesses: ----------.
| weblog | http://home.wanadoo.nl/b.de.zoete/_private/weblog.html |
| webontwerp | http://home.wanadoo.nl/b.de.zoete/html/webontwerp.html |
|zweefvliegen | http://home.wanadoo.nl/b.de.zoete/html/vliegen.html |
`-------------------------------------------------- --<--@ ------------'
 
J

Jukka K. Korpela

Captain Dondo said:
I ran my site through the html validator....
http://validator.w3.org/check?uri=http://www.seiner.com/blog/T
ravels%2F&charset=%28detect+automatically%29&doctype=XHTML+1.0+Strict

I am requesting strict validation.

Why are you using XHTML 1.0 and not HTML 4.01? Do you _know_ that you gain
something real by that - and know how to avoid the pitfalls you're digging?

Why do you use a Strict DTD in validation, when you apparently want to use
deprecated attributes that don't belong to Strict DTD? (And why do you use
DOCTYPE override instead of using a DOCTYPE that has chances of matching
the markup?)
I have a whole bunch of <a href="JavaScript:void(0)"
onClick="JavaScript:window.open('... type statements.

Redesign that part from scratch to save time. Really. Such a pseudo-link is
guaranteed to break many things. (Do you think search engines run
JavaScript?) Done right, the link is simple and there are much fewer
possibilities for syntax errors. Anyway, technically...
The validator
tells me that for a specific line there is no 'onClick' attribute....

That is correct. XHTML is case-sensitive, and the attribute name must be
spelled 'onclick'. You would avoid this by using HTML 4.01...
Ditto for <div class="feedback" align="right"> - it doesn't like the
aligh="right" but again, only once and not the other 50 times it
appears....

The align attribute for <div> isn't part of Strict versions. The validator
reports an error of this kind only once. If it did otherwise, authors would
complain about irritating repeated error messages. :)
 
B

Beauregard T. Shagnasty

Captain said:
I ran my site through the html validator....
http://validator.w3.org/check?uri=h...etect+automatically)&doctype=XHTML+1.0+Strict


I am requesting strict validation. I have a couple of interprettion
questions on the results.

I have a whole bunch of <a href="JavaScript:void(0)"

I don't do JavaScript.
Ditto for <div class="feedback" align="right"> - it doesn't like the
aligh="right" but again, only once and not the other 50 times it
appears....

What am I missing here?

<div class="feedback" style="text-align: right;">

...however, if you have this alignment 50 times, put it in the class,
once. Or if you use class feedback elsewhere, make a new class.
 
C

Captain Dondo

Jukka said:
Why are you using XHTML 1.0 and not HTML 4.01? Do you _know_ that you gain
something real by that - and know how to avoid the pitfalls you're digging?

I don't.... I have no idea what the difference is... But at least now
I know what to look for.... I am a technically sophisticated HTML
newbie.... Programmer, yes. C code, etc, no problem. HTML - not
really. I just try to hack together other people's code to make it
work. (No, I don't do this professionally. That is my personal site.)
Why do you use a Strict DTD in validation, when you apparently want to use
deprecated attributes that don't belong to Strict DTD? (And why do you use
DOCTYPE override instead of using a DOCTYPE that has chances of matching
the markup?)

Well, I use Wordpress (http://www.wordpress.org) to generate the pages.
The theme I use has apparently been abandoned by its author - the
author's page has been down for a few months now. So if I am to fix any
problems, I had better start learning the issues....

Redesign that part from scratch to save time. Really. Such a pseudo-link is
guaranteed to break many things. (Do you think search engines run
JavaScript?) Done right, the link is simple and there are much fewer
possibilities for syntax errors. Anyway, technically...

I've hacked together a whole bunch of disparate plugins and themes to
make that website work. It works, but it has a lot of ugly stuff
underneath. I am looking at maintaining it for a while, so I'd like to
make it as clean as I can.

Any hints on how to redesign my image insertions from scratch? My
readers like the popup window and the options, so I need to keep that
functionality, but if there is a better way to generate it I am open to
all suggestions....

To get it all to work, I've had to learn HTML, MySQL, PHP, javascript...
It's been a steep curve....
That is correct. XHTML is case-sensitive, and the attribute name must be
spelled 'onclick'. You would avoid this by using HTML 4.01...

OK, thanks.

--Yan
 
J

Jukka K. Korpela

Captain Dondo said:
Any hints on how to redesign my image insertions from scratch? My
readers like the popup window and the options, so I need to keep that
functionality, but if there is a better way to generate it I am open to
all suggestions....

I haven't checked what the code currently does, but there are surely better
ways to create popup windows than <a href="JavaScript:void(0)"
onClick="JavaScript:window.open('..., which completely fail when JavaScript
is off. Better use e.g.

<a href="somedoc.html" target="somename" onclick=
"return !window.open('somedoc.html','somename',...)">...</a>

Some modifications of this idea are described at
http://www.cs.tut.fi/~jkorpela/forms/javascript.html#window
 
C

CptDondo

Jukka said:
I haven't checked what the code currently does, but there are surely better
ways to create popup windows than <a href="JavaScript:void(0)"
onClick="JavaScript:window.open('..., which completely fail when JavaScript
is off. Better use e.g.

<a href="somedoc.html" target="somename" onclick=
"return !window.open('somedoc.html','somename',...)">...</a>

Some modifications of this idea are described at
http://www.cs.tut.fi/~jkorpela/forms/javascript.html#window

Cool ideas.... Next time I get to hacking on my PHP script that
generates the image insert code, I'll change it around....

Right now I'm sort of burned out on coding; I've got a large,
PLC-controlled piece of equipment at work that will not cooperate with
its programming.....

I'll return to the website when coding becomes fun again... For now it's
time to hike and drink good beer on my time off... :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Validation crisis 12
Html validation help, please 5
Even McMahon fails validation 21
XHTML validation 7
Passing Validation 2
correction brings more errors 8
IFrame validation 10
the final word on my limerick page 10

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top