View Full Version : noscript inside the head tag validation error

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......


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<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>
<link href="css/main2.css" rel="stylesheet" type="text/css"/>

<div id="container3">
<div id="content">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
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>
<!--> <![endif]-->
<!--end of content-->
<!--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-->

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


BODY {background-color:#000000;}
BODY {background-color:#ff0000;}

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.