Jump to content

Javascript validation & dynamic form validation


geminizin

Recommended Posts

There are a few questions here,1. Does Javascript need to be validated?2. Is it better to include javascript codes in the html file or better to store it as its own js file and include the reference in the html file? Why?3. This is bugging me a lot. I have a dynamic form that different input types will show up depending on what the user has selected previously. The HTML source code however doesn't include these dynamic components. How do I have it XHTML validated?Thanks a lot!

Link to comment
Share on other sites

JavaScript doesn't have to be validated, however, you have to make sure that most of the browsers support what function you are going to use otherwise your site might not be available to others. I prefer to make a new .js file for JavaScript because it keeps the XHTML file tidier, and I find it easier to edit.Most Markup validators can validate XHTML files. Try the W3C Markup Validation Service. There is also a CSS Validation Service. Another tool is Unicorn, a universal conformance checker, by W3C. It can check (X)HTML and CSS at the same time. Other tools by W3C like the Link Checker are also useful.

Link to comment
Share on other sites

JavaScript doesn't have to be validated, however, you have to make sure that most of the browsers support what function you are going to use otherwise your site might not be available to others. I prefer to make a new .js file for JavaScript because it keeps the XHTML file tidier, and I find it easier to edit.Most Markup validators can validate XHTML files. Try the W3C Markup Validation Service. There is also a CSS Validation Service. Another tool is Unicorn, a universal conformance checker, by W3C. It can check (X)HTML and CSS at the same time. Other tools by W3C like the Link Checker are also useful.
Yeah I have been using those online validators. The problem is dynamic HTML controls wouldn't be included in the original document. How do I have it validated then? Thanks.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...