AddBookmark javascript that works with both Moz/IE

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bangman
    Confirmed User
    • Sep 2004
    • 5283

    #1

    AddBookmark javascript that works with both Moz/IE

    Use this script for an addbookmark that works with both IE and Firefox.
    See it in action @ http://www.teenieupdate.com

    Between <head> tags:
    Code:
    <script>
    function addBookmark(title,url) {
    		//alert('adding ' + title + ', ' + url);
    		if (window.sidebar) {
    			window.sidebar.addPanel(title, url,"");
    		} else if( document.all ) {
    			window.external.AddFavorite( url, title);
    		} else if( window.opera && window.print ) {
    			return true;
    		}
    	}
    </script>
    At Location:
    Code:
    javascript:void(addBookmark('Site title here', window.location.href));
    Hope some of you find this useful
    - David Hall
    ICQ: 312744199
Working...