Solved

Html validation wont pass on javascript onchange

Posted on 2008-06-10
3
664 Views
Last Modified: 2008-06-13
Hi Im trying to html validation on code on site, with this site for validation the site pass w3schools validation but seo software says I have 52 errors on html validation, i tried 3 validation services only can find one issue not sure how to fix, im also looking for better ways to validate code.

<select name="business_name" onChange="this.form.submit();">
###################################

Error (1)
 Line Column: 190
156 Error: When using embedded events (Event-Handler), script language must be specified within Meta-Tag
(z.B. <meta http-equiv="Content-Script-Type" content="text/javascript">)
or HTTP-Header (Content-Script-Type: text/javascript)
  Error Position: "get"><select name="business_name" onChange="this.form.submit();"  
 
0
Comment
Question by:spotcher
3 Comments
 
LVL 6

Expert Comment

by:TheAnarchist
Comment Utility
Without seeing the full validation report, I can only make guesses.

From what you've posted, I am assuming that the validator suggested that you needed to specify the script language, and it gave you an example. Have you put that example meta tag in the head of your document, and tried to re-validate?
<meta http-equiv="Content-Script-Type" content="text/javascript">

Open in new window

0
 
LVL 4

Expert Comment

by:sajay_j
Comment Utility
Use w3c for validation purpose. The URL follows;
http://validator.w3.org/

Either you need to specify the url or attach the page below. We cannot guess what causes the error..
0
 
LVL 31

Accepted Solution

by:
gwkg earned 250 total points
Comment Utility
In the new version of the validator, they are going one step forward when it comes to validate embedded script attributes. Technicaly there has been a "request" to use a meta tag that describe what kind of script is used for embedded attributes, like "onload" or "onclick", on the page. This "request" was not mandatory to have the page valid but seams to be that now, at least for XHTML.
http://forum.statcounter.com/vb/archive/index.php/t-28939.html

Add the meta tag or change your doctype
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
A/B testing is a simple and effective trick to get to know your audience, increase website conversions and make the most out of your online ad campaigns. It's widely available and doesn't need much tech knowledge to be executed, but the results it y…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now