Forum Moderators: coopster

Message Too Old, No Replies

Survey: Do your PHP, MySQL, CSS and AJAX combo pages validate

got to be honest...

         

henry0

9:29 pm on Oct 16, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Survey: Do your pages validate when using
PHP, MySQL, CSS and AJAX combo?
The above is triggered by:
WebmasterWorld highlighted threads [webmasterworld.com]

Since it’ll mean nothing without an honest answer let me start:
With a blend of all the above I am not validating 100%
Always missing quite a few stuffs that I cannot fix!
<edit>But I am crossbrowsers OK </edit>

Anyango

7:54 am on Oct 18, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



To be honest, Never. But thats because of not giving much importance to validation, not that it would't validate when tried.

henry0

11:22 am on Oct 18, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



When using all of the above, I found it almost or close to impossible to validate.

RonPK

11:31 am on Oct 18, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



henry0, I don't understand why PHP and MySQL should lead to 'bad' HTML. Can you explain?

henry0

12:33 pm on Oct 18, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I wish I could!
However I am not speaking about only those two (PHP MySQL)
but about the whole combo
I personally was never able to validate as soon as JS arrive in the ball game

Further please, consider that my post is not about me, it’s about “Do you validate within the described parameters” ?

I guess you do, so we have a yes I do, correct?

RonPK

4:09 pm on Oct 18, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Well, I have to admit I often use the align attribute in images, which is considered evil in HTML 4.01 Strict. Or forget the alt attribute. Or use a conditional comment like "<![if gte IE 7]>".

PHP's nl2br() tends to impose an XHTML-style line break element (<br />) which isn't correct in ordinary HTML. Not sure whether that makes the document invalid.

As for JS: perhaps you need to escape forward slahses?

[edited by: RonPK at 4:15 pm (utc) on Oct. 18, 2008]

PHP_Chimp

8:04 pm on Oct 18, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Are we talking XHTML or HTML for validation?

As for javascript I find that the document.write tends to lead to validation errors. Whereas if you use the createElement and other DOM methods that you end up with content that validates.

henry0

10:15 pm on Oct 18, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



We're speaking HTML and I make sure that my BRs are pure <br>
As far as JS is concerned problems mostly come AJAX

Receptional Andy

10:21 pm on Oct 18, 2008 (gmt 0)



I use a fair amount of javascript these days, but I aim to never make any HTML changes for javascript other than additional classes or IDs, which means it never causes any validation problems.