Log in

View Full Version : W3C Error



spazzer
03-15-2010, 08:24 PM
Hi,
I have used a flash newsticker in my website and have only about 6 errors in the W3C Markup Validation Service one is below, can anyone help as would like website to be validated by W3C, can anyone help ?

here is my HTML Code for the Ticker:

<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','763','height','30','title','Flash News Ticker','src','Assets/Images/Global/newsticker','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','Assets/Images/Global/newsticker' ); //end AC code
</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="763" height="30" title="Flash News Ticker">
<param name="movie" value="Assets/Images/Global/newsticker.swf" />
<embed src="Assets/Images/Global/newsticker.swf" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="763" height="30"></embed>
</object>
</noscript>

This is the Error I get

Line 72, Column 197: there is no attribute "width"

…aveFlash" type="application/x-shockwave-flash" width="763" height="30"></embed>



You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.

djr33
03-16-2010, 12:06 AM
If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.
Start there and see if that answers your question.

spazzer
03-16-2010, 08:50 AM
Hi,
Thanks for reply, I checked the FAQ but am still very new to all this and need to learn from you guys and was wondering if someone could explain what I need to do to validate my site correctly, I,m not good with Flash so need a little help ?

Thanks,
Nick C

traq
03-16-2010, 02:34 PM
Original post edited out in favor of BLiZZaRD's contribution below...

\/ that looks pretty cool... something else to learn. thanks, Blizzard

BLiZZaRD
03-17-2010, 02:36 AM
The Satay Method is largely outdated now. Using SWFObject is cleaner, easier and allows more control. full details, download/install and help found here (http://blog.deconcept.com/swfobject/)

It seems overwhelming so let me give this detail:

Download the files, upload to the root in their own folder. Add the link in the <head> section to the folder just like any other JS.

Create a div for your Flash like so:



<div id="flashStuff">
Insert words here about not having Flash installed blah blah
</div>


Then add the SO code as shown on the link above, and publish it to the div ID. Done done.

You only need the link in the head section on pages that have the flash and you can reuse the uploaded scripts for every page as well.