Solved

Html validation wont pass on javascript onchange

Posted on 2008-06-10
3
666 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

This article discusses how to create an extensible mechanism for linked drop downs.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

776 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