Solved

Html validation wont pass on javascript onchange

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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.
With more and more people tethered to the internet, advertisers can reach you in new and creative ways. Push notifications on your smartphone, customized advertisements based on your previous searches, and email inboxes filled with promotional pitch…
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
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).

830 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