Related Articles

More

Related Categories

More

Recently Added

More

En Title Insurance Company

Zachary Said:

Okay, so I'm writing this XHTML code?

We Answered:

XHTML is pretty rigorous about whether or not its input is valid. It may misbehave if you give it invalid input. To check for this, use an XHTML validator; there's a free one available through the W3C's website: http://validator.w3.org/check

Your Javascript is also pretty bad. You can check this here: http://www.jslint.com/

Specifically, your if statement is way off. It should look like this:

if ( Age <= 5 ) {
Entitlement = "take a nap every day";
} else if ( Age <= 13 ) {
Entitlement = "be a child, play and have fun";
...

Discuss It!