Программирование > JavaScript & JScript
Помогите понять почему не работает скрипт ......
(1/1)
demyan:
Есть скрипт который выводит аналоговые часы на странице ... так вот на одной странице он работает (первая), а на другой нет (вторая), вызываются одинаково, вот ну никак не пойму почему не работает .......
Первая страница:
ДСЭРС-Томск
.........
A:Link{ Color: #000000; Text-decoration: underline}
A:Visited{ Color: #000000; Text-decoration: underline}
A:Hover{ Color: #000000; Text-decoration: none}
td, body {font-family: verdana, arial, helvetica; font-size:11px;}
..........
..........
............
Вторая страница:
var tmd2;
var max_top = 160;
var min_top = 60;
var her = 0;
function set_menu()
{
pts = 160;
timerID2 = tmd2;
clearTimeout(timerID2);
if (document.body.scrollTop>max_top)
{
if ((pts+document.body.scrollTop+document.getElementById(\'menu\').offsetHeight-152)>=(document.getElementById(\'td_menu\').offsetHeight+130))
{
pts= document.body.scrollTop-(document.body.scrollTop+document.getElementById(\'menu\').offsetHeight-(document.getElementById(\'td_menu\').offsetHeight+130));
// alert(document.body.scrollTop+document.getElementById(\'menu\').offsetHeight+\'sdfsdf\'+document.getElementById(\'td_menu\').offsetHeight)
}
else
{
pts = document.body.scrollTop;
}
}
if (document.getElementById(\'td_menu\').offsetHeight!=690) document.all["menu"].style.pixelTop = pts;
pts = 0;
timerID2 = setTimeout(\'set_menu()\',1);
tmd2 = timerID2;
height_menu();
}
function height_menu()
{
menu_height=document.getElementById(\'menu\').offsetHeight;
document.getElementById(\'td_menu\').style.height=menu_height+30;
}
ДСЭРС-Томск
A:Link{ Color: #000000; Text-decoration: underline}
A:Visited{ Color: #000000; Text-decoration: underline}
A:Hover{ Color: #000000; Text-decoration: none}
td, body {font-family: verdana, arial, helvetica; font-size:11px;}
........
........
........
// alert(document.body.scrollyY);
//alert(document.getElementById(\'\').offsetHeight);
такое ощущение, что один скрипт мешает другому (так как во втором случае добавляется еще скрипт), но чем не пойму
Навигация
Перейти к полной версии