Консультация № 70703
12.01.2007, 23:37
0.00 руб.
0 1 1
Здравствуйте, уважаемые Эксперты. Вставил на страницу очень даже симпатичное меню, все работает нормально. Но, возникла такая проблема: в строке состояния высвечивается текст последней ссылки меню. Можно ли это как-то исправить. Часть кода в приложении (весь не входит).
С уважением, Rico.

Приложение:
/********************************************************************************Functions to write out the layers...********************************************************************************/menus=new Array(); var a=0; var b=0; var c=0; var d=0function makeMenu(type,text,lnk,target,end){ str=""; tg=""; if(target) tg=‘target="‘+target+‘"‘ if(!lnk) lnk="#" self.status=lnk if(a==0) str=‘<div id="divSlideCont">\n‘ if(type=="top"){ menus[a]=new Array(); if(text=="seperator"){ str+=‘\t<div id="divSlide‘+a+‘" class="clSlide"></div>\n‘ menus[a].seperator=1 }else{ str+=‘\t<div id="divSlide‘+a+‘" class="clSlide"><a href="‘+lnk+‘" ‘+tg+‘ onclick="swmenu(‘+a+‘,-1,-1); if(bw.ie || bw.ns6) this.blur(); ‘ if(lnk=="#") str+=‘return false‘ str+=‘" class="clSlideLinks"> ‘+text+‘</a>
</div>\n‘ } menus[a].subs=0; a++; b=0 }else if(type=="sub"){ str+=‘\t\t<div id="divSlideSub‘+(a-1)+‘_‘+(b)+‘" class="clSlideSub"><a ‘+tg+‘ onclick="swmenu(‘+(a-1)+‘,‘+b+‘,-1); if(bw.ie || bw.ns6) this.blur(); ‘ if(lnk=="#") str+=‘return false‘ str+=‘" href="‘+lnk+‘" class="clSlideSubLinks">  ‘+text+‘</a>
</div>\n‘ b++; menus[a-1].subs=b; menus[a-1][b-1]=new Array(); c=0; menus[a-1][b-1].subs=0 }else if(type=="sub2"){ str+=‘\t\t<div id="divSlideSub‘+(a-1)+‘_‘+(b-1)+‘_‘+c+‘" class="clSlideSub2"><a ‘+tg+‘ href="‘+lnk+‘" class="clSlideSub2Links">  ‘+text+‘</a>
</div>\n‘ c++; menus[a-1][b-1].subs=c; menus[a-1][b-1][c-1]=new Array(); d=0; menus[a-1][b-1][c-1].subs=0 } if(end) str+="</div>" document.write(str)}function preLoadBackgrounds(){ for(i=0;i<arguments.length;i++){ this[i]=new Image() this[i].src=arguments[i] } return this}</script><!-- HEAD END HERE --></head><body bgcolor="#ffffff" text="#FFFFFF" link="#FFFFFF" topmargin="0" leftmargin="0"><!-- BODY START HERE --><script>//Variables to setbetween=28 //The pixel between the menus and the submenusmainheight=25 //The height of the mainmenussubheight=22 //The height of the submenuspxspeed=13 //The pixel speed of the animationtimspeed=15 //The timer speed of the animationmenuy=80 //The top placement of the menu.menux=0 //The left placement of the menu//Images - Play with theselevel0_regular="level0_regular.gif"level0_round="level0_round.gif"level1_regular="level1_regular.gif"level1_round="level1_round.gif"level1_sub="level1_sub.gif"level1_sub_round="level1_sub_round.gif"level1_round2="level1_round2.gif"level2_regular="level2_regular.gif"level2_round="level2_round.gif"//Leave this linepreLoadBackgrounds(level0_regular,level0_round,level1_regular,level1_round,level1_sub,level1_sub_round,level1_round2,level2_regular,level2_round)//There are 3 different types of menus you can make//top = Main menus//sub = Sub menus//sub2 = SubSub menus//You control the look of the menus in the stylesheet//makeMenu(‘TYPE‘,‘TEXT‘,‘LINK‘,‘TARGET‘, ‘END (THE LAST MENU)‘)//Menu 0 makeMenu(‘top‘,‘Главная‘) makeMenu(‘sub‘,‘Ваша ссылка‘,‘/index.html‘) makeMenu(‘sub‘,‘Ваша ссылка‘,‘/index2.html‘)//Menu 1makeMenu(‘top‘,‘Программы‘) makeMenu(‘sub‘,‘Диски‘,‘/index3.html‘) makeMenu(‘sub‘,‘Редакторы‘,‘/index4.html‘) makeMenu(‘sub‘,‘Категории‘) makeMenu(‘sub2‘,‘Ваша страница‘,‘/index10.html‘) makeMenu(‘sub2‘,‘Text scripts‘,‘/script/search.asp?category=text‘) makeMenu(‘sub2‘,‘Animation scripts‘,‘/script/search.asp?category=animation‘) makeMenu(‘sub2‘,‘Other scripts‘,‘/script/search.asp?category=other‘) //Menu 2 makeMenu(‘top‘,‘Tutorials‘) makeMenu(‘sub‘,‘Tutorials‘,‘/tutorials/index.asp‘)//Menu 3makeMenu(‘top‘,‘Forums‘) makeMenu(‘sub‘,‘Cool sites‘,‘forums/forum.asp?FORUM_ID=1&CAT_ID=1&Forum_Title=Cool+sites‘) makeMenu(‘sub‘,‘CoolMenus‘,‘forums/forum.asp?FORUM_ID=2&CAT_ID=1&Forum_Title=CoolMenus‘) makeMenu(‘sub‘,‘Crossbrowser‘,‘forums/forum.asp?FORUM_ID=3&CAT_ID=1&Forum_Title=Crossbrowser+DHTML‘) makeMenu(‘sub‘,‘Scripts‘,‘forums/forum.asp?FORUM_ID=4&CAT_ID=1&Forum_Title=DHTML+Scripts‘) makeMenu(‘sub‘,‘dhtmlcentral.com‘,‘forums/forum.asp?FORUM_ID=5&CAT_ID=1&Forum_Title=dhtmlcentral%2Ecom‘) makeMenu(‘sub‘,‘General‘,‘forums/forum.asp?FORUM_ID=6&CAT_ID=1&Forum_Title=General+DHTML+issues‘) makeMenu(‘sub‘,‘Off-topic‘,‘forums/forum.asp?FORUM_ID=9&CAT_ID=1&Forum_Title=Off%2Dtopic‘) makeMenu(‘sub‘,‘Active topics‘,‘forums/active.asp‘)//Menu 4 makeMenu(‘top‘,‘CoolMenus‘) makeMenu(‘sub‘,‘Examples‘,‘coolmenus/examples/‘) makeMenu(‘sub‘,‘Download‘,‘coolmenus/download.asp‘) makeMenu(‘sub‘,‘Tutorial‘,‘coolmenus/tutorial.asp‘) makeMenu(‘sub‘,‘FAQ‘,‘faq/index.asp‘)//Menu 5makeMenu(‘top‘,‘Resources‘) makeMenu(‘sub‘,‘DHTML Links‘,‘resources/default.asp‘) //Menu 6 makeMenu(‘top‘,‘dhtmlcentral‘) makeMenu(‘sub‘,‘dhtmlcentral‘,‘dhtmlcentral/index.asp‘,"",1)//Starting the menuonload=SlideMenuInit;</script><!-- BODY END HERE -->

Обсуждение

Неизвестный
13.01.2007, 00:53
общий
это ответ
Доброе время суток, Rico

добавьте в 17 строку после вызова обработчика onClick в теге A после this.blur(); что-нибудь в стиле window.status = ‘‘;

с уважением, удачи
Форма ответа