kwdrysdale Posted November 26, 2007 Share Posted November 26, 2007 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 Quote Link to comment https://forums.phpfreaks.com/topic/78860-solved-trying-to-validate-my-code/ Share on other sites More sharing options...
PFMaBiSmAd Posted November 26, 2007 Share Posted November 26, 2007 Because the error is referring to the context that the posted code is being used in, you would need to post the surrounding code for anyone in a forum to be able to help you. Quote Link to comment https://forums.phpfreaks.com/topic/78860-solved-trying-to-validate-my-code/#findComment-399117 Share on other sites More sharing options...
kwdrysdale Posted November 26, 2007 Author Share Posted November 26, 2007 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> Quote Link to comment https://forums.phpfreaks.com/topic/78860-solved-trying-to-validate-my-code/#findComment-399178 Share on other sites More sharing options...
kwdrysdale Posted November 26, 2007 Author Share Posted November 26, 2007 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> Quote Link to comment https://forums.phpfreaks.com/topic/78860-solved-trying-to-validate-my-code/#findComment-399193 Share on other sites More sharing options...
kwdrysdale Posted November 26, 2007 Author Share Posted November 26, 2007 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 Quote Link to comment https://forums.phpfreaks.com/topic/78860-solved-trying-to-validate-my-code/#findComment-399202 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.