homepage Welcome to WebmasterWorld Guest from 50.16.17.90
register, login, search, subscribe, help, library, PubCon, announcements, recent posts, open posts,
Subscribe to WebmasterWorld

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library : Charter : Moderators: incrediBILL & tedster

HTML Forum

    
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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
WebmasterWorld ® and PubCon ® are a Registered Trademarks of Pubcon Inc.
© Pubcon Inc. 1996-2012 all rights reserved