Gość Ziker Napisano Luty 7 Zgłoś Share Napisano Luty 7 Witam, mam tak oto skrypt: function changeLanguage(lang) { var url = window.location.href; var filename = url.substring(url.lastIndexOf('/')+1); var pathname = url.substring(0, url.lastIndexOf('/')+1); if (lang == 'en' && url.indexOf('en') == '-1') { window.navigate(pathname +'en/'+ filename); } if (lang == 'pl' && url.lastIndexOf('en') != '-1') { var pathname = url.substring(0, url.lastIndexOf('/')-2); window.navigate(pathname + filename); } } Powoduje on zapisanie aktualnego url strony, po czym rozbija owy url na dwa elementy (sciezke, bez nazwy pliku i rozszerzenia) oraz na nazwe pliku wraz z rozszerzeniem. Skrypt dziala pod Opera 10, IE 8, IE 7 - nie dziala natomiast pod Mozilla i Google Chrome. Jaka moze byc tego przyczyna? Drugi problem to menu zrobione w CSS, wszystko byloby dobrze, ale IE7 wyswietla podmenu POD strona (tj. div'ami umieszczonymi na stronie). .menu-v ul{ margin: 0; padding: 0; width: 140px; /* Main Menu Item widths */ list-style-type: none; font: bold 12px Verdana; border-top: 1px solid #8C897D; border-right: 1px solid #8C897D; border-left: 1px solid #8C897D; position:relative; left:10px; top:80px; border-bottom:1px hidden; } .menu-v ul li{ position: relative; text-indent: 17px; } /* Top level menu links style */ .menu-v ul li a{ display: block; overflow: auto; /*force hasLayout in IE7 */ color:#8C7A55; text-decoration: none; padding: 6px; } .menu-v ul li a:link, .menu-v ul li a:visited, .menu-v ul li a:active{ background:#C1BCA8 url(../Images/menubtnback.png) no-repeat left; /*background of menu items (default state)*/ color:#8C7A55; } .menu-v ul li a.selected{ /*CSS class that's dynamically added to the currently active menu items' LI A element*/ background: #C1BCA8 url(../Images/menubtnbackdown.png) no-repeat left; color:#A29D53; } .menu-v ul li a:hover{ background: #C1BCA8 url(../Images/menubtnbackdown.png) no-repeat left; /*background of menu items during onmouseover (hover state)*/ color:#938942; font-style:oblique; } /*Sub level menu items */ .menu-v ul li ul{ position: absolute; width: 140px; /*Sub Menu Items width */ top: 0; font-weight: normal; visibility: hidden; } /* Holly Hack for IE \*/ * html .menu-v ul li { float: left; height: 1%; } * html .menu-v ul li a { height: 1%; } /* End */ Coz mozna z tym zrobic? Moze potrzeba wiecej informacji? Z gory dziekuje za weszlka udzielona pomoc, pozdrawiam. Cytuj Link do komentarza Udostępnij na innych stronach More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.