Jump to content

[SOLVED] Trying to Validate my Code


kwdrysdale

Recommended Posts

I have spent countless hours working on a site, and learning TONS of stuff about PHP, CSS and proper coding techniques.  It's been a blast.  Anyway...I am at a point where I was wanting to validate the html and make sure everything was 100%.  I tried to validate the code at http://validator.w3.org/ and got errors in this section that I am not sure how to fix.

 

<noscript>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="668" height="220" title="d">
<param name="movie" value="flash/srm flash1.swf" />
<param name="quality" value="high" />
<embed src="flash/srm flash1.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="668" height="220"></embed>
</object>
</noscript>

 

I am using the following as my document type:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

 

I think the biggest error, if there is a way around it, is the first one:

document type does not allow element "noscript" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag .

 

<noscript>

 

 

The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

 

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").

 

Is there a way to fix this?  What it is doing, is if someone has javascript turned off, the flash movie will still play, so it is using a flash plugin.  OR...should I just do away with the javascript way of playing the movie and just use the object tag to use the plugin?  Thanks for any advice you can give that will help me get this validated properly.

 

Kevin

 

Link to comment
Share on other sites

As "requested" here is the entire <div> that contains the offending code:

<div id="InteriorHeader">
<a href="index.html">
<script type="text/javascript">
AC_FL_RunContent('codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','400','height','200','title','d','src','flash/srm flash1','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','flash/srm flash1' );
</script>
<noscript>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="668" height="220" title="d">
<param name="movie" value="flash/srm flash1.swf" />
<param name="quality" value="high" />
<embed src="flash/srm flash1.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="668" height="220"></embed>
</object>
</noscript>
</a>
</div>

Link to comment
Share on other sites

I figured it out.  It was the <embed> tag that is no longer valid in xhtml.  I searched all the tags in that section to see if I could find anything that would not work proper and found it.  Works good.  New code, for anyone interested is:

<div id="InteriorHeader">
<a href="index.html">
<script type="text/javascript">
AC_FL_RunContent('codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','400','height','200','title','d','src','flash/srm flash1','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','flash/srm flash1' );
</script>
<noscript>
<object type="application/x-shockwave-flash" 
data="flash/srm flash1.swf" 
width="668" height="220">
<param name="movie" value="flash/srm flash1.swf" />
<param name="quality" value="high"/>
</object>
</noscript>
</a>
</div>

Link to comment
Share on other sites

I thought this code above would work flawlessly (it did as a section of code on the validator), but it still didn't like the <noscript> tag once everything was put together.  So...I just dropped the javascript and am using the flashplayer object.  Are there any benefits to keeping the javascript in the file?

 

Kevin

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.