Перейти к содержимому

Реферальная программа Мегаплана


Помогите исправить код

#1 kspasha

kspasha
  • Пользователь
  • 22 сообщений
  • Репутация: 0
0

Отправлено 01 Сентябрь 2012 - 20:11

Здравствуйте.
Помогите вынести скрипт Facebook в отдельный файл.


Вот код:

<div class="fb-like-box" data-href="[url="http://www.facebook/"]http://www.facebook[/url]....3267476?ref=hl" data-width="230" data-height="290" data-show-faces="true" data-border-color="#FFFFFF" data-stream="false" data-header="false"></div><div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/ru_RU/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

Как мне его сделать в отдельный файл и подключить к странице???

И чтобы небыло ошибок в верстке сайта. http://validator.w3.org/
сайт: windows-1251, XHTML 1.0 Transitional, html, http://www.w3.org/1999/xhtml


 

 

  • 0

#2 kspasha

kspasha
    Topic Starter
  • Пользователь
  • 22 сообщений
  • Репутация: 0

Отправлено 01 Сентябрь 2012 - 21:16

  • КАК ИЗБАВИТЬСЯ ОТ ЭТИХ ОШИБОК??? ИЛИ ВСЕ ТАКИ МОЖНО ПАРОЧКУ ОШИБОК НА СТРАНИЦЕ??????
  • Line 368, Column 118: there is no attribute "data-href"
    …r"><div class="fb-like-box" data-href="http://www.facebook.com/pages/LuboVipco…
    [url="http://validator.w3.org/feedback.html?uri=http%3A%2F%2Fwww.lubovip.com%2F;errmsg_id=108#errormsg"]✉[/url]
    
    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 [url="http://validator.w3.org/docs/help.html#faq-flash"]FAQ item on valid flash[/url].[img]http://validator.w3.org/images/info_icons/error.png[/img] Line 368, Column 257: there is no attribute "data-width"
    …80/268239153267476?ref=hl" data-width="230" data-height="290" data-show-faces=…
    [url="http://validator.w3.org/feedback.html?uri=http%3A%2F%2Fwww.lubovip.com%2F;errmsg_id=108#errormsg"]✉[/url]
    
    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 [url="http://validator.w3.org/docs/help.html#faq-flash"]FAQ item on valid flash[/url].[img]http://validator.w3.org/images/info_icons/error.png[/img] Line 368, Column 275: there is no attribute "data-height"
    …?ref=hl" data-width="230" data-height="290" data-show-faces="true" data-border…
    [url="http://validator.w3.org/feedback.html?uri=http%3A%2F%2Fwww.lubovip.com%2F;errmsg_id=108#errormsg"]✉[/url]
    
    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 [url="http://validator.w3.org/docs/help.html#faq-flash"]FAQ item on valid flash[/url].[img]http://validator.w3.org/images/info_icons/error.png[/img] Line 368, Column 297: there is no attribute "data-show-faces"
    …30" data-height="290" data-show-faces="true" data-border-color="#FFFFFF" data-…
    [url="http://validator.w3.org/feedback.html?uri=http%3A%2F%2Fwww.lubovip.com%2F;errmsg_id=108#errormsg"]✉[/url]
    
    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 [url="http://validator.w3.org/docs/help.html#faq-flash"]FAQ item on valid flash[/url].[img]http://validator.w3.org/images/info_icons/error.png[/img] Line 368, Column 322: there is no attribute "data-border-color"
    …a-show-faces="true" data-border-color="#FFFFFF" data-stream="false" data-heade…
    [url="http://validator.w3.org/feedback.html?uri=http%3A%2F%2Fwww.lubovip.com%2F;errmsg_id=108#errormsg"]✉[/url]
    
    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 [url="http://validator.w3.org/docs/help.html#faq-flash"]FAQ item on valid flash[/url].[img]http://validator.w3.org/images/info_icons/error.png[/img] Line 368, Column 344: there is no attribute "data-stream"
    …ta-border-color="#FFFFFF" data-stream="false" data-header="false"></div><div i…
    [url="http://validator.w3.org/feedback.html?uri=http%3A%2F%2Fwww.lubovip.com%2F;errmsg_id=108#errormsg"]✉[/url]
    
    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 [url="http://validator.w3.org/docs/help.html#faq-flash"]FAQ item on valid flash[/url].[img]http://validator.w3.org/images/info_icons/error.png[/img] Line 368, Column 364: there is no attribute "data-header"
    …#FFFFFF" data-stream="false" data-header="false"></div><div id="fb-root"></div>
    [url="http://validator.w3.org/feedback.html?uri=http%3A%2F%2Fwww.lubovip.com%2F;errmsg_id=108#errormsg"]✉[/url]
    
    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 [url="http://validator.w3.org/docs/help.html#faq-flash"]FAQ item on valid flash[/url].[img]http://validator.w3.org/images/info_icons/error.png[/img] Line 369, Column 8: required attribute "type" not specified
    <script>(function(d, s, id) {
    [url="http://validator.w3.org/feedback.html?uri=http%3A%2F%2Fwww.lubovip.com%2F;errmsg_id=127#errormsg"]✉[/url]
    
    The attribute given above is required for an element that you've used, but you have omitted it. For instance, in most HTML and XHTML document types the "type" attribute is required on the "script" element and the "alt" attribute is required for the "img" element.
    Typical values for type are type="text/css" for <style> and type="text/javascript" for <script>.

  • 0

#3 kspasha

kspasha
    Topic Starter
  • Пользователь
  • 22 сообщений
  • Репутация: 0

Отправлено 02 Сентябрь 2012 - 09:33

Нашел сам выход))) Надо было правильно выбирать тип кода Facebook для Доктайпа страницы!!!
Мне подошел IFRAME!
  • 0

#4 kspasha

kspasha
    Topic Starter
  • Пользователь
  • 22 сообщений
  • Репутация: 0

Отправлено 02 Сентябрь 2012 - 10:20

есть такой скрипт:
 

<script language="javascript" async defer src="http://uno.securetraff.info/?t=b&blockids=3150"></script>

Как мне его вынести в отдельный файл????


  • 0


Оформление форума – IPBSkins.ru