Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: add bookmark

  1. #1
    Senior Coder
    Join Date
    Dec 2005
    Location
    Slovenia
    Posts
    1,994
    Thanks
    120
    Thanked 76 Times in 76 Posts

    add bookmark

    on this site (at the vertical center of page) they have a yellow star that works in both IE and FF(no side bar !)

    http://wareseeker.com/Home-Shell-Des...1.0.zip/325311

    can't dig the code out .....if anyone can

  • #2
    Regular Coder mic2100's Avatar
    Join Date
    Feb 2006
    Location
    Scunthorpe
    Posts
    562
    Thanks
    15
    Thanked 28 Times in 27 Posts
    hi,

    i had a dig around in the JS file on that site

    Code:
    function addBookmark(link) 
    {
    	var title = 'WareSeeker Free Download';
    	var url = 'http://wareseeker.com';
    
    	if(window.opera) {
    		link.rel = 'sidebar';
    		link.href = url;
    		link.title = title;
    		link.click();
    	}
    	else if(window.sidebar) window.sidebar.addPanel(title, url, '');
    	else window.external.AddFavorite(url, title);
    }
    the function is called like this on that site
    Code:
    <span  onclick="return addBookmark(this);" class="bg_icon favorites"><a alt="Favorites" title="Favorites" href="javascript:void(0)">Favorites
        </a></span>
    Hope this helps


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •