Solved

Html validation wont pass on javascript onchange

Posted on 2008-06-10
3
665 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
ID: 21756372
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
ID: 21757778
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
ID: 21765964
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.

861 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

30 Experts available now in Live!

Get 1:1 Help Now