Версия для печати темы
Нажмите сюда для просмотра этой темы в оригинальном формате
Форум программистов > Вёрстка веб-сайтов > валидатор...


Автор: Evghenusi 5.3.2010, 00:41
валидатор ругается на этот код:
Код

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" 
codebase="/swflash.cab#version=8,0,0,0" width="96" height="20">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="player.swf&amp;startplay=false" />
<embed src="player.swf&amp;startplay=false" width="96" height="20" 
type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>
</object>


я убрал тег embed, получилось что-то типа:
Код

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="/swflash.cab#version=8,0,0,0" width="96" height="20" type="application/x-shockwave-flash"
data="player.swf?file=&amp;startplay=false">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="player.swf?file=&amp;startplay=false" />
</object>

но теперь в FireFox-е плеер не работает smile 

может подскажете как переделать код, что бы валидатор не "гавкался"?

Автор: bars80080 5.3.2010, 00:48
а на что он ругается?


попробуй также вместо
<embed src="player.swf&amp;startplay=false" width="96" height="20" 
type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>

Код

<embed src="player.swf&amp;startplay=false" width="96" height="20" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
хотя не велика разница


либо забей на валидатор. толку-то с него?

Автор: Evghenusi 5.3.2010, 01:03
Код

Line 145, Column 12: there is no attribute "src"

<embed src="player.swf?file=&amp;sta…

✉

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.

и так по всем параметрам пробегается, а после пишет:
Код

Line 147, Column 60: element "embed" undefined

  pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>

✉

You have used the element named above in your document, but the document type you are using does not 
define an element of that name. 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 
"Frameset" document type to get the "<frameset>" element),
    * by using vendor proprietary extensions such as "<spacer>" or "<marquee>" (this is usually fixed by 
using CSS to achieve the desired effect instead).
    * by using upper-case tags in XHTML (in XHTML attributes and elements must be all lower-case).

Автор: blah 5.3.2010, 04:28
Evghenusi,
Используйте http://code.google.com/p/swfobject/

Автор: bars80080 5.3.2010, 16:38
Цитата(Evghenusi @  5.3.2010,  00:03 Найти цитируемый пост)
Line 145, Column 12: there is no attribute "src"

так написано же - там нет атрибута src. у вас в настоящем коде (а не том, который вы привели здесь) проблемы с тэгом embed

попробуйте написать его заново, и желательно в одну строчку, без разрывов на новую строку. следите за раскладкой клавиатуры

Автор: SelenIT 5.3.2010, 18:49
Цитата(blah @  5.3.2010,  04:28 Найти цитируемый пост)
Используйте swfobject 

http://designformasters.info/posts/flash-embed-with-swfobject-2/

Можно, конечно, извратнуться с методом http://www.alistapart.com/articles/flashsatay (заодно код будет короче)... или, что еще проще, заменить доктайп на <!DOCTYPE html> (HTML5 :)

Автор: Evghenusi 5.3.2010, 20:47
Цитата(bars80080 @  5.3.2010,  16:38 Найти цитируемый пост)
так написано же - там нет атрибута src. у вас в настоящем коде (а не том, который вы привели здесь) проблемы с тэгом embed

попробуйте написать его заново, и желательно в одну строчку, без разрывов на новую строку. следите за раскладкой клавиатуры 


1)код я вырвал из рабочей страницы и представил вам, так что будьте уверены что там тоже есть атрибут 
src, валидатор ругается и по поводу всех остальных атрибутов тега embed

2)код только тут я разорвал, для удобства его чтения, и что бы не появлялся горизонтальный scrollbar

Автор: bars80080 6.3.2010, 00:57
тогда единственный совет - плюньте на этот валидатор.

вот какая с него польза?

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)