The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Validation Problem, Validation problem with validome.org
Poncho Franzwarez
post Aug 20 2009, 04:07 PM
Post #1





Group: Members
Posts: 1
Joined: 20-August 09
Member No.: 9,500



Hi,
I'm having trouble validating my website, because the same error keeps on coming up, even when I try to correct it. It says the following message:

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:
<body onload="checkCookie()">

And here's my code:

CODE

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="generator" content="notepad" />
<meta name="keywords" content="boy scouts, danville, troop" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<style type="text/css">
#NAV { position: absolute;
       left: 1050px; top: 0px;
       border: solid brown 2px; background-color: wheat; padding: 30px;
       font-size: x-large;
     }
</style>
<title>
Official Danville Troop 60 Website
</title>
<script type="text/javascript">
function getCookie(c_name)
{
if (document.cookie.length>0)
  {
  c_start=document.cookie.indexOf(c_name + "=");
  if (c_start!=-1)
    {
    c_start=c_start + c_name.length+1;
    c_end=document.cookie.indexOf(";",c_start);
    if (c_end==-1) c_end=document.cookie.length;
    return unescape(document.cookie.substring(c_start,c_end));
    }
  }
return "";
}

function setCookie(c_name,value,expiredays)
{
var exdate=new Date();
exdate.setDate(exdate.getDate()+expiredays);
document.cookie=c_name+ "=" +escape(value)+
((expiredays==null) ? "" : ";expires="+exdate.toGMTString());
}

function checkCookie()
{
username=getCookie('username');
if (username!=null & username!="")
  {
  alert('Welcome again '+username+'!');
  }
else
  {
  username=prompt('Please enter your name:',"");
  if (username!=null & username!="")
    {
    setCookie('username',username,365);
    }
  }
}
</script>
<!--
#header { color:red; font-style:italic; font-weight:bold; font-family:Calibri; }
#links { color:brown; font-weight:bold; font-family:Calibri; }
-->
</head>
<body onload="checkCookie()">
<table style="background-color:#F0F00F" border="1">
<tr>
<td><div style="width:1250px; border-color: brown; border-style:solid">
<table style="background-color:#F0F08F" border="1">
<tr>
<td><div style="width:1235px; height:200px; border-color: brown; border-style:solid"><span style="color:red; font-style:italic; font-weight:bold; font-family:Calibri;"><img src="MikeDubrall.jpeg" width="200" height="200" alt="Mike Dubrall" align="right" /><font size="6">Danville Troop 60!</font></span>
<h2>We're Troop 60 and we say <i>hi!</i></h2>
</div>
</td>
</tr>
</table>
<a href="index.htm"><img src="Home.png" border="0" width="120" height="19" alt="Home" /></a><a href="outings.htm"><img border="0" src="Outings.png" width="120" height="19" alt="Outings" /></a><a href="meetings.htm"><img border="0" src="MeetingInfo.png" width="120" height="19" alt="Meetings" /></a><a href="newscouts.htm"><img border="0" src="NewScouts.png" width="120" height="19" alt="New Scouts" /></a><a href="adults.htm"><img border="0" src="AdultInfo.png" width="120" height="19" alt="Adult Info" /></a><a href="photos.htm"><img border="0" src="Photos.png" width="120" height="19" alt="Photos" /></a>
<table style="background-color:#F0F08F" border="1">
<tr>
<td><div style="width:1235px; border-color: brown; border-style:solid">
<b><font size="5">Welcome to Boy Scout Troop 60, chartered in 2005. Our sponsor is the American Legion.
The primary goal of Scouting is to build boy leaders in an outdoor-oriented environment.
Troop 60 is dedicated to the development of character, citizenship, and physical and mental fitness in its member
Scouts. Our program provides the opportunity for leadership development and the learning of skills in a variety of
areas. The Troop is not an extension of school or family but an entity unto itself offering young men a chance to
explore and learn about leadership, integrity, communicating and being a productive member of a team.
Scouts are rewarded for all of their accomplishments by formal recognition and appropriate badges.</font></b>
<br />
<br />
<br />
<script type="text/javascript" language="JavaScript" src="http://www.micropoll.com/akira/MicroPoll?id=195161"></script><noscript><div><a href="http://www.micropoll.com/akira/mpview/644798-195161">Click Here for Poll</a><a href="http://www.questionpro.com" title="online surveys">Online Survey</a><br /> | <a href="http://www.micropoll.com" title="Website Polls">Website Polls</a><br /> | <a href="http://www.contactpro.com" title="email marketing">Email Marketing</a><br /><br /> | <a href="http://www.ideascale.com" title="crowdsourcing">Crowdsourcing</a><br /><a href="http://www.micropoll.com/akira/MicroPoll?mode=html&id=195161">View MicroPoll</a></div></noscript>
<br />
<br />
<b>
Copyright 2009 Troop 60. All rights reserved.
</b>
</div>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</body>
</html>


I'm kind of an amateur web designer, so I'm not sure what's going wrong. wacko.gif

Thanks.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Aug 20 2009, 04:58 PM
Post #2


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



And if you add the suggested Meta tag? Does it still complain?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Frederiek
post Aug 21 2009, 04:04 AM
Post #3


Programming Fanatic
********

Group: Members
Posts: 5,146
Joined: 23-August 06
From: Europe
Member No.: 9



The page has a FRAMESET DOCTYPE.

Besides, I've never before META seen used to link to external CSS or Javascript files. But I might be wrong.
I'd say use LINK for CSS and SCRIPT for JS.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Aug 21 2009, 07:05 AM
Post #4


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



QUOTE
The page has a FRAMESET DOCTYPE.

Indeed it does! blush.gif

QUOTE
Besides, I've never before META seen used to link to external CSS or Javascript files. But I might be wrong.
I'd say use LINK for CSS and SCRIPT for JS.

It isn't for linking to external files, it's to declare the language used for embedded scripts and styles. I don't think the usual validators compain about this, but this one is correct. The language should be declared somewhere, Meta or HTTP.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Frederiek
post Aug 21 2009, 12:07 PM
Post #5


Programming Fanatic
********

Group: Members
Posts: 5,146
Joined: 23-August 06
From: Europe
Member No.: 9



QUOTE
It isn't for linking to external files, it's to declare the language used for embedded scripts and styles. I don't think the usual validators compain about this, but this one is correct. The language should be declared somewhere, Meta or HTTP.

Yeah, that's what I figured.
But why bother to only declare it in such a way? When linking in the usual way to these files, they are declared too, no?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Aug 21 2009, 02:29 PM
Post #6


.
********

Group: WDG Moderators
Posts: 9,628
Joined: 10-August 06
Member No.: 7



According to http://www.w3.org/TR/html401/interact/scripts.html#h-18.2.2

"document authors must explicitly tell user agents the language of each script. This may be done either through a default declaration or a local declaration."

I recall someone once explained that a default declararation is needed for e.g. inline scripts like

CODE
<p onclick="alert('Foo');">

where the scripting language used can't be declared locally, since no SCRIPT element is used.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Frederiek
post Aug 21 2009, 04:07 PM
Post #7


Programming Fanatic
********

Group: Members
Posts: 5,146
Joined: 23-August 06
From: Europe
Member No.: 9



Ah, ok. Thanks for the info. Though I've never seen it use like that before.
See, one's never too old to learn. biggrin.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 18th March 2024 - 10:49 PM