...

View Full Version : noscript inside the head tag validation error



hbadger30
08-04-2006, 05:39 PM
Dear all,

I'm having a problem trying to validate this document - it has to do with the <noscript> tags inside the head of the document. I'm switching the style sheet in the head of the document according to the user's screen resolution via js and I want to provide a default stylesheet if the user's browser isn't js enabled. I'm not quite sure what I need to do in order to get it to work and also validate.

Any help would be much appreciated!

Thanks in advance......

Graham



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>www.philhobden.co.uk</title>
<meta name="description" content="Independent UK Producer-Writer-Director"/>
<meta name="keywords" content="film, Film, films, Films, producer, producers, Producer, Producers, actor, Actors, writer, writers, Writer, Writers, Phil, Hobden, Phil Hobden, Philhobden, philhobden, mod-life?, Modlife"/>
<meta name="copyright" content="&copy; 2006 Graham Archer"/>
<meta name="Author" content="Phil Hobden"/>
<meta http-equiv="Content-type" content="text/html; charset=iso-8859-1"/>
<meta http-equiv="Content-Language" content="en-us"/>
<link rel="shortcut icon" href="favicon.ico"/>
<script type="text/javascript" src="javascript/external.js"></script><!--OPEN NEW WINDOWS AND VALIDATE-->
<script type="text/javascript" src="javascript/AC_OETags.js"></script><!--FLASH DETECTION-->
<script type="text/javascript" src="javascript/requiredflashver.js"></script><!--MAKE SURE ITS FLASH PLAYER 6 or HIGHER-->
<script type="text/javascript" src="javascript/cssswitch.js"></script>
<noscript>
<link href="css/main2.css" rel="stylesheet" type="text/css"/>
</noscript>
</head>

<body>
<div id="container3">
<div id="content">
<p>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"
width="802" height="715">
<param name="movie" value="flash/intro_d_preloader.swf"/>
<param name="quality" value="high"/>
<param name="bgcolor" value="#FFFFFF"/>
<!--[if !IE]> <-->
<object data="flash/intro_d_preloader.swf"
width="802" height="715" type="application/x-shockwave-flash">
<param name="quality" value="high"/>
<param name="bgcolor" value="#FFFFFF"/>
<param name="pluginurl" value="http://www.macromedia.com/go/getflashplayer"/>
Please download <a href="http://www.macromedia.com/go/getflashplayer">Macromedia Flash Player.</a>
</object>
<!--> <![endif]-->
</object>
</p>
</div>
<!--end of content-->
</div>
<!--end of container-->
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"><!--GOOGLE ANALYTICS-->
</script><!--GOOGLE ANALYTICS-->
<script type="text/javascript"><!--GOOGLE ANALYTICS-->
_uacct = "UA-443638-4";<!--GOOGLE ANALYTICS-->
urchinTracker();<!--GOOGLE ANALYTICS-->
</script><!--GOOGLE ANALYTICS-->
</body>
</html>

Scriptbanger
08-19-2006, 11:24 PM
:cool: If I understand CSS properly the last style listed supersedes all others.

Example:



<style>
BODY {background-color:#000000;}
BODY {background-color:#ff0000;}
</style>


The above style should recognize the last BODY entry and set the background color to red. Following this logic, try placing the default style sheet link prior to the scripts without the <noscript></noscript>. The scripts then, if available, should supercede the first stylesheet.

This isn't a perfect solution but it may provide a valid workaround. I would definately do a lot of cross-browser/cross-platform testing to make sure it is a viable solution.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum