| W3C Validation Errors Again.
|
Jimbo123

msg:4107065 | 4:32 pm on Mar 30, 2010 (gmt 0) | Hi there, I'm having problems with validating my site with W3C, it's stating an error of: Line 133, Column 10: document type does not allow element "noscript" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag <noscript> I've checked through the coding but cannot understand why this error is occouring as it didn't before. </script> <noscript> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="300" height="250" align="right"> <param name="movie" value="graphics/banners/Slide1" /> <!--[if !IE]>--> <object type="application/x-shockwave-flash" data="graphics/banners/Slide1" width="300" height="250"> <!--<![endif]--> <p>Alternative content</p> <!--[if !IE]>--> </object> <!--<![endif]--> </object> </noscript> Can anyone help me? Thanks, James
|
rocknbil

msg:4107193 | 8:33 pm on Mar 30, 2010 (gmt 0) | This is for Flash, correct? Take all that stuff out of there. All of it. Download SWFObject [code.google.com]. Create an image that represents a "screenshot" of your flash. <p id="my-flash"><img src="my-flash-placeholder.jpg" width="330" height="290" alt="my alt content"></p> There's your alternate content, which loads first. Now at the bottom of the document before the closing body tag, <script type="text/javascript" src="swfobject.js"></script> <script type="text/javascript"> var myvideo = new SWFObject('my-flash-file.swf', 'myflash', '330', '290', '6', '#ffffff'); myvideo.addParam("wmode", "transparent"); window.onload = function() { if (document.getElementById('my-flash')) { myvideo.write('my-flash'); } }; </script> Should have no trouble validating that. No IE conditionals, no need for noscript, no invalid embed nested in object, just clean content that works with or without JS. Note the bolded width and height, and change accordingly.
|
|
|