Javascript.RU

Создать новую тему Ответ
 
Опции темы Искать в теме
  #1 (permalink)  
Старый 01.09.2011, 12:16
KDM KDM вне форума
Новичок на форуме
Отправить личное сообщение для KDM Посмотреть профиль Найти все сообщения от KDM
 
Регистрация: 01.09.2011
Сообщений: 2

Не могу подключить меню
Доброго времени суток!Есть сайт,в нем сделано меню.
<script type="text/javascript" src="stmenu.js"></script>

</head>
<body>
<div id="container">
  <div id="holder" class="clearfix">
    <div id="logo">
      <h1>ООО &quot;СИК ТулабетонСтрой"</h1>
    </div>
    <div>
<script type="text/javascript">
<!--

stm_bm(["menu41c9",960,"","blank.gif",0,"","",0,0,250,0,1000,1,0,0,"","",0,0,1,2,"default","hand","",1,25],this);
stm_bp("p0",[0,4,0,0,1,4,0,7,100,"",-2,"",-2,50,2,2,"#999999","transparent","",3,0,0,"#000000"]);
stm_ai("p0i0",[0,"О компании","","",-1,-1,0,"index.html","_self","","","","",0,0,0,"","",0,0,0,1,1,"#E6EFF9",1,"#0066FF",1,"bg2.gif","",3,3,0,0,"#E6EFF9","#000000","#000000","#000000","8pt Verdana","8pt Verdana",0,0,"bg1.gif","","bg3.gif","",6,6,22],130,0);
stm_aix("p0i1","p0i0",[0,"Продукция и цены","","",-1,-1,0,"","_self","","","","",0,0,0,"arrow_r.gif","arrow_r.gif",7,7,0,1,1,"#E6EFF9",1,"#FFFFFF"],130,0);
stm_bp("p1",[1,4,0,-1,0,4,0,0,100,"",-2,"",-2,50,2,2,"#CCCCCC","#FFFFFF","",3,1,1,"#FFFFFF"]);
stm_ai("p1i0",[0,"Товарный бетон","","",-1,-1,0,"tovbet.html","_self","","","","",0,0,0,"","",0,0,0,0,1,"#FFFFFF",1,"#FFFFFF",1,"","",0,0,1,1,"#FFFFFF","#FFFFFF","#000000","#000000","8pt Verdana","8pt Verdana",0,0,"","","","",0,0,0],130,0);
stm_ai("p1i1",[6,1,"#0033FF","",-1,-1,0]);
stm_aix("p1i2","p1i0",[0,"Товарный раствор","","",-1,-1,0,"tovrast.html"],130,0);
stm_aix("p1i3","p1i1",[]);
stm_aix("p1i4","p1i0",[0,"Транспортные услуги","","",-1,-1,0,"transusl.html"],130,0);
stm_ep();
stm_aix("p0i2","p0i1",[0,"Контроль качества","","",-1,-1,0,"control.html","_self","","","","",0,0,0,"","",0,0],130,0);
stm_aix("p0i3","p0i0",[0,"Сертификаты","","",-1,-1,0,"sert.html","_self","","","","",0,0,0,"","",0,0,0,1,1,"#E6EFF9",1,"#FFD602"],130,0);
stm_aix("p0i4","p0i3",[0,"Контакты","","",-1,-1,0,"contacts.html"],130,0);
stm_aix("p0i5","p0i3",[0,"Фотогалерея","","",-1,-1,0,"foto.html"],120,0);
stm_ep();
stm_em();
//-->
</script>

Страничек в сайте добавляется и так как добавлять в каждую страницу текст меню неудобно,то хочу сделать,чтобы меню загружалось из файла например menu.js,но не получается.Почитал форум,но что-то не нашел решения.Помогите пожалуйста - нужно очень срочно.Надеюсь на вашу отзывчивость .

Последний раз редактировалось KDM, 01.09.2011 в 12:30.
Ответить с цитированием
  #2 (permalink)  
Старый 01.09.2011, 19:22
Аватар для crayday
Аспирант
Отправить личное сообщение для crayday Посмотреть профиль Найти все сообщения от crayday
 
Регистрация: 30.08.2011
Сообщений: 61

В файл menu.js пишем (если подключён jquery, то лучше пользовать ready, а не onload)
window.onload = function() {
	stm_bm(["menu41c9",960,"","blank.gif",0,"","",0,0,250,0,1000,1,0,0,"","",0,0,1,2,"default","hand","",1,25],this);
	stm_bp("p0",[0,4,0,0,1,4,0,7,100,"",-2,"",-2,50,2,2,"#999999","transparent","",3,0,0,"#000000"]);
	stm_ai("p0i0",[0,"О компании","","",-1,-1,0,"index.html","_self","","","","",0,0,0,"","",0,0,0,1,1,"#E6EFF9",1,"#0066FF",1,"bg2.gif","",3,3,0,0,"#E6EFF9","#000000","#000000","#000000","8pt Verdana","8pt Verdana",0,0,"bg1.gif","","bg3.gif","",6,6,22],130,0);
	stm_aix("p0i1","p0i0",[0,"Продукция и цены","","",-1,-1,0,"","_self","","","","",0,0,0,"arrow_r.gif","arrow_r.gif",7,7,0,1,1,"#E6EFF9",1,"#FFFFFF"],130,0);
	stm_bp("p1",[1,4,0,-1,0,4,0,0,100,"",-2,"",-2,50,2,2,"#CCCCCC","#FFFFFF","",3,1,1,"#FFFFFF"]);
	stm_ai("p1i0",[0,"Товарный бетон","","",-1,-1,0,"tovbet.html","_self","","","","",0,0,0,"","",0,0,0,0,1,"#FFFFFF",1,"#FFFFFF",1,"","",0,0,1,1,"#FFFFFF","#FFFFFF","#000000","#000000","8pt Verdana","8pt Verdana",0,0,"","","","",0,0,0],130,0);
	stm_ai("p1i1",[6,1,"#0033FF","",-1,-1,0]);
	stm_aix("p1i2","p1i0",[0,"Товарный раствор","","",-1,-1,0,"tovrast.html"],130,0);
	stm_aix("p1i3","p1i1",[]);
	stm_aix("p1i4","p1i0",[0,"Транспортные услуги","","",-1,-1,0,"transusl.html"],130,0);
	stm_ep();
	stm_aix("p0i2","p0i1",[0,"Контроль качества","","",-1,-1,0,"control.html","_self","","","","",0,0,0,"","",0,0],130,0);
	stm_aix("p0i3","p0i0",[0,"Сертификаты","","",-1,-1,0,"sert.html","_self","","","","",0,0,0,"","",0,0,0,1,1,"#E6EFF9",1,"#FFD602"],130,0);
	stm_aix("p0i4","p0i3",[0,"Контакты","","",-1,-1,0,"contacts.html"],130,0);
	stm_aix("p0i5","p0i3",[0,"Фотогалерея","","",-1,-1,0,"foto.html"],120,0);
	stm_ep();
	stm_em();
}
Ответить с цитированием
  #3 (permalink)  
Старый 01.09.2011, 20:50
KDM KDM вне форума
Новичок на форуме
Отправить личное сообщение для KDM Посмотреть профиль Найти все сообщения от KDM
 
Регистрация: 01.09.2011
Сообщений: 2

Спасибо большое все работает
Ответить с цитированием
  #4 (permalink)  
Старый 07.06.2013, 12:35
Интересующийся
Отправить личное сообщение для Demonuka Посмотреть профиль Найти все сообщения от Demonuka
 
Регистрация: 07.06.2013
Сообщений: 13

Аналогичная проблема с stmenu.js.
Подключаю все вот так:
<head>
<title>Арсенал СТ: Проекты домов: каркасные быстровозводимые дома, здания</title>
<meta name="keywords" content="быстровозводимые здания, каркасные дома, лёгкие стальные тонкостенные конструкции, экономичное строительство, термопрофиль, производство, проектировка, строительство в, коттеджи, коммерческие постройки, быстрая окупаемость, зимой, возведение, дешёвые, надёжные, большой срок службы, высокое качество" /><meta name="description" content="Арсенал СТ - лидер строительного рынка России" />
<meta charset="utf-8"/>
<link rel="shortcut icon" href="http://www.arsenal-st.ru/favicon.ico" type="image/x-icon"/>
<link href="/css/main.css" rel="stylesheet" type="text/css" media="all" />
<link href="/css/nivo-slider.css" rel="stylesheet" type="text/css" media="all" />
<link href="/css/colorbox.css" rel="stylesheet" type="text/css" media="all" />
<script type="text/javascript" src="/js/menu/stmenu.js"></script>
<script type="text/javascript" src="/js/jquery.js"></script>
<script type="text/javascript" src="/js/jquery.colorbox.min.js"></script>
<script type="text/javascript" src="/js/jquery.nivo.slider.min.js"></script>
<script type="text/javascript" src="/js/funcs.js"></script>
<script type="text/javascript" src="/js/ac_runactivecontent.js"></script>
<script type="text/javascript">
	$.noConflict();
</script>
<script src="//ajax.googleapis.com/ajax/libs/mootools/1.4.5/mootools-yui-compressed.js"></script>
<script type="text/javascript" src="/js/vector.js"></script>
<script type="text/javascript" src="/js/map-mootools_ru.js"></script>
<script type="text/javascript" src="/js/ac_runactivecontent.js"></script>
<link rel="stylesheet" type="text/css" media="all" href="/css/map_style.css"/>
</head>
<body>
<div id="d_all">
<div id="d_header">
<div class="d_clr"></div>
<span id="menu"><script type="text/javascript" src="/js/menu/menu_ru.js"></script>


Скрипт menu_ru.js выглядит так:
window.ready = function() 
{ 
stm_bm(["menu034e",970,"/images/main/","blank.gif",0,"","",0,0,250,0,100,1,0,0,"","1070",0,0,1,2,"default","hand","",1,25],this);
stm_bp("p0",[0,4,0,0,0,5,0,10,100,"",-2,"",-2,50,0,0,"#999999","transparent","",0,0,0,"#000000"]);
stm_ai("p0i0",[0,"О компании","","",-1,-1,0,"/ru/o_kompanii.htm","_self","","","","",0,0,0,"","",0,0,0,1,1,"#FFFFFF",1,"#FFFFFF",1,"","menu-sel.png",3,3,0,0,"#808080","#000000","#FFFFFF","#FFFFFF","16px 'PT Sans','Arial','Verdana','SansSerif'","16px 'PT Sans','Arial','Verdana','SansSerif'",0,0,"","","","",0,0,0],110,40);
stm_ai("p0i1",[6,1,"transparent","/images/main/menu-sep.png",1,40,0]);
stm_aix("p0i2","p0i0",[0,"О технологии","","",-1,-1,0,"","_self","","","","",0,0,0,"/images/main/arrow-right-white.png","/images/main/arrow-down-white.png",10,10,0,1,1,"#FFFFFF",1,"#FFFFFF",1,"","menu-sel.png",3,3,0,0,"#E6EFF9"],130,40);
stm_bp("p1",[1,4,-1,0,0,10,0,10,100,"",-2,"",-2,50,0,0,"#999999","#ce3e3e","",3,0,0,"#FFF"]);
stm_aix("p1i0","p0i0",[0,"История развития технологии","","",-1,-1,0,"/ru/technology_history.htm","_self","","","","",0,0,0,"","",0,0,0,0,1,"#FFFFFF",1,"#025d97",0,"","",3,3,0,0,"#808080","#808080","#FFFFFF","#FFFFFF","14px 'PT Sans','Arial','Verdana','SansSerif'","14px 'PT Sans','Arial','Verdana','SansSerif'"],0,31);
stm_aix("p1i1","p1i0",[0,"Описание технологии","","",-1,-1,0,"/ru/opisanie_tehnologii.htm"],0,31);
stm_aix("p1i2","p1i0",[0,"Варианты применения","","",-1,-1,0,"","_self","","","","",0,0,0,"/images/main/arrow-right-white.png","/images/main/arrow-right-white.png",10,10],0,31);
stm_bpx("p2","p1",[1,2,3,0,0,10,0,0]);
stm_aix("p2i0","p1i0",[0,"Жилые здания","","",-1,-1,0,"/ru/tehno_jilie.htm","_self","","","/images/main/gray-dot-small.png","/images/main/red-dot-small.png"],0,31);
stm_aix("p2i1","p2i0",[0,"Административно-коммерческие здания","","",-1,-1,0,"/ru/tehno_zdania_kommercheskie.htm"],0,31);
stm_aix("p2i2","p2i0",[0,"Здания сельскохозяйственного назначения","","",-1,-1,0,"/ru/tehno_zdania_selhoz.htm"],0,31);
stm_aix("p2i3","p2i0",[0,"Здания социального назначения","","",-1,-1,0,"/ru/tehno_zdania_socialnie.htm"],0,31);
stm_aix("p2i4","p2i0",[0,"Здания специального назначения","","",-1,-1,0,"/ru/tehno_zdania_specialnie.htm"],0,31);
stm_aix("p2i5","p2i0",[0,"Мансарды, надстройки, стропильные системы","","",-1,-1,0,"/ru/tehno_stropilnie_sistemi.htm"],0,31);
stm_aix("p2i6","p2i0",[0,"Ограждающие конструкции для высотного строительства","","",-1,-1,0,"/ru/tehno_ograjdayushie_konstrukcii.htm"],0,31);
stm_aix("p2i7","p2i0",[0,"Малые архитектурные формы","","",-1,-1,0,"/ru/tehno_malie_formi.htm"],0,31);
stm_ep();
stm_aix("p1i3","p1i2",[0,"Материалы, применяемые в технологии ЛСТК"],0,31);
stm_bpx("p3","p2",[]);
stm_aix("p3i0","p2i0",[0,"Фундамент","","",-1,-1,0,"/ru/materiali_fundament.htm"],0,31);
stm_aix("p3i1","p2i0",[0,"Утеплитель","","",-1,-1,0,"/ru/materiali_uteplitel.htm"],0,31);
stm_aix("p3i2","p2i0",[0,"Плитные материалы обшивки","","",-1,-1,0,"/ru/materiali_obshivki.htm"],0,31);
stm_ep();
stm_aix("p1i4","p1i0",[0,"Преимущества технологии","","",-1,-1,0,"/ru/tehnologija-karkasnogo-stroitelstva.htm"],0,31);
stm_ep();
stm_aix("p0i3","p0i1",[]);
stm_aix("p0i4","p0i2",[0,"Продукция"],120,40);
stm_bpx("p4","p2",[1,4,-1]);
stm_aix("p4i0","p2i0",[0,"Типовые комплекты зданий","","",-1,-1,0,"/ru/products_kits.htm"],0,31);
stm_aix("p4i1","p2i0",[0,"Профили, термопрофили, детали для строительства","","",-1,-1,0,"/ru/termoprofil.htm"],0,31);
stm_aix("p4i2","p2i0",[0,"Стальные ограждения «Palisad»","","",-1,-1,0,"/ru/products_hfences.htm"],0,31);
stm_aix("p4i3","p2i0",[0,"Сертификаты","","",-1,-1,0,"/ru/certificates.htm"],0,31);
stm_ep();
stm_aix("p0i5","p0i1",[]);
stm_aix("p0i6","p0i2",[0,"Прайс-листы","","",-1,-1,0,"/ru/price.htm","_self","","","","",0,0,0,"","",0,0],130,40);
stm_aix("p0i7","p0i1",[]);
stm_aix("p0i8","p0i2",[0,"Партнёры"],110,40);
stm_bpx("p5","p1",[]);
stm_aix("p5i0","p2i0",[0,"Ассоциации","","",-1,-1,0,"/ru/partners_associations.htm"],0,31);
stm_aix("p5i1","p1i2",[0,"Проектные организации","","",-1,-1,0,"","_self","","","/images/main/gray-dot-small.png","/images/main/red-dot-small.png"],0,31);
stm_bpx("p6","p2",[]);
stm_aix("p6i0","p2i0",[0,"Центральный федеральный округ","","",-1,-1,0,"/ru/partners_project_orgs_cfo.htm"],0,31);
stm_aix("p6i1","p2i0",[0,"Приволжский федеральный округ","","",-1,-1,0,"/ru/partners_project_orgs_pvfo.htm"],0,31);
stm_aix("p6i2","p2i0",[0,"Уральский федеральный округ","","",-1,-1,0,"/ru/partners_project_orgs_ufo.htm"],0,31);
stm_aix("p6i3","p2i0",[0,"Северо-западный федеральный округ","","",-1,-1,0,"/ru/partners_project_orgs_szfo.htm"],0,31);
stm_aix("p6i4","p2i0",[0,"Южный федеральный округ","","",-1,-1,0,"/ru/partners_project_orgs_yfo.htm"],0,31);
stm_aix("p6i5","p2i0",[0,"Сибирский федеральный округ","","",-1,-1,0,"/ru/partners_project_orgs_sfo.htm"],0,31);
stm_aix("p6i6","p2i0",[0,"Страны ближнего и дальнего зарубежья ","","",-1,-1,0,"/ru/partners_project_orgs_sng.htm"],0,31);
stm_ep();
stm_aix("p5i2","p5i1",[0,"Дилеры"],0,31);
stm_bpx("p7","p2",[]);
stm_aix("p7i0","p2i0",[0,"Центральный федеральный округ","","",-1,-1,0,"/ru/stroitelstvo-domov-v-centralnom-federalnom-okruge.htm"],0,31);
stm_aix("p7i1","p2i0",[0,"Приволжский федеральный округ","","",-1,-1,0,"/ru/partners_dealers_pvfo.htm"],0,31);
stm_aix("p7i2","p2i0",[0,"Уральский федеральный округ","","",-1,-1,0,"/ru/partners_dealers_ufo.htm"],0,31);
stm_aix("p7i3","p2i0",[0,"Северо-западный федеральный округ","","",-1,-1,0,"/ru/stroitelstvo-domov-v-severo-zapadnom-federalnom-okruge.htm"],0,31);
stm_aix("p7i4","p2i0",[0,"Сибирский федеральный округ","","",-1,-1,0,"/ru/stroitelstvo-domov-v-sibirskom-federalnom-okruge.htm"],0,31);
stm_aix("p7i5","p2i0",[0,"Южный федеральный округ","","",-1,-1,0,"/ru/stroitelstvo-domov-v-juzhnom-federalnom-okruge.htm"],0,31);
stm_aix("p7i6","p2i0",[0,"Дальневосточный федеральный округ","","",-1,-1,0,"/ru/partners_dealers_dfo.htm"],0,31);
stm_aix("p7i7","p2i0",[0,"Северо-Кавказский федеральный округ","","",-1,-1,0,"/ru/partners_dealers_skfo.htm"],0,31);
stm_aix("p7i8","p2i0",[0,"Страны ближнего и дальнего зарубежья ","","",-1,-1,0,"/ru/partners_dealers_sng.htm"],0,31);
stm_ep();
stm_ep();
stm_aix("p0i9","p0i1",[]);
stm_aix("p0i10","p0i6",[0,"Реализованные проекты","","",-1,-1,0,"/ru/done.htm"],210,40);
stm_aix("p0i11","p0i1",[]);
stm_aix("p0i12","p0i6",[0,"Вопросы и ответы","","",-1,-1,0,"/ru/faq.htm"],0,40);
stm_aix("p0i13","p0i1",[]);
stm_aix("p0i14","p0i6",[0,"Контакты","","",-1,-1,0,"/ru/contacts.htm"],90,40);
stm_ep();
stm_em();
}

Но меню не отображается. Совсем не отображается Что я делаю не так?
Ответить с цитированием
Ответ



Опции темы Искать в теме
Искать в теме:

Расширенный поиск


Похожие темы
Тема Автор Раздел Ответов Последнее сообщение
Находится ли мышка над дивом ? (выпадающее меню) advsm jQuery 31 24.09.2014 17:50
Ищу jQuery плагин для создания меню Zeboton jQuery 9 15.09.2014 15:31
Проблема с аккордионом и меню Tie ExtJS 3 01.09.2011 14:36
Всплывающее меню (проблемы) Барин Элементы интерфейса 8 07.07.2011 09:22
[проблема] не могу выровнить меню по центру. MrGibSoN (X)HTML/CSS 4 21.06.2008 18:28