Версия для печати темы
Нажмите сюда для просмотра этой темы в оригинальном формате
Форум программистов > JavaScript: Общие вопросы > "сделать стартовой"


Автор: yosik 18.1.2006, 23:33
Сылки: "сделать стартовой" и "добавить в избраное" у меня в браузере роботают, а у других нет. Как сделать так, чтоб они работали и на других браузерах?

Автор: LSD 19.1.2006, 00:19
Модератор: перемещено из Java: Апплеты

Автор: Innuendo 19.1.2006, 20:22
Цитата

Сылки: "сделать стартовой" и "добавить в избраное" у меня в браузере роботают, а у других нет. Как сделать так, чтоб они работали и на других браузерах?

дай свой код, как ты пишешь эти ссылки.

Автор: o.s.a. 20.1.2006, 09:23
Код

<a href="http://Location/Of/Bookmark/Page" title="Bookmark Title" rel="sidebar" onclick="
if( window.sidebar && window.sidebar.addPanel ) {
    //Gecko (Netscape 6 etc.) - add to Sidebar
    window.sidebar.addPanel( this.title, this.href, '' );
} else if( window.external && ( navigator.platform == 'Win32' ||
      ( window.ScriptEngine && ScriptEngine().indexOf('InScript') + 1 ) ) ) {
    //IE Win32 or iCab - checking for AddFavorite produces errors in
    //IE for no good reason, so I use a platform and browser detect.
    //adds the current page page as a favourite; if this is unwanted,
    //simply write the desired page in here instead of 'location.href'
    window.external.AddFavorite( location.href, document.title );
} else if( window.opera && window.print ) {
    //Opera 6+ - add as sidebar panel to Hotlist
    return true;
} else if( document.layers ) {
    //NS4 & Escape - tell them how to add a bookmark quickly (adds current page,
    //not target page)
    window.alert( 'Please click OK then press Ctrl+D to create a bookmark' );
} else {
    //other browsers - tell them to add a bookmark (adds current page, not target page)
    window.alert( 'Please use your browser\'s bookmarking facility to create a bookmark' );
}
return false;
">Add to Favorites, Bookmarks, Sidebar or Hotlist</a>

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)