View Single Post
Old 04-21-2010, 05:20 PM  
Jdoughs
Confirmed User
 
Jdoughs's Avatar
 
Industry Role:
Join Date: Mar 2004
Location: Great White North
Posts: 5,794
Quote:
Originally Posted by Ditosta View Post
Does anyone know of a good bookmark script that can bookmark the page you are currently on without having to hard code the URL ?

Right now I am using javascript and I have to put the url like this

javascript:bookmarksite('mysite', 'http://mysiteurl.com')
PHP Code:
<script type="text/javascript">
function 
bookmarksite()
{
         if (
document.all)
        {
             
// For IE
             
window.external.AddFavorite(location.hrefdocument.title);
         }
        else if (
window.sidebar)
       {
             
// For Firefox
             
window.sidebar.addPanel(document.titlelocation.href"");
        }
}
</script> 
And then where you want it to show:

PHP Code:
    <a href="javascript:bookmarksite();"Bookmark Us!</a
__________________
LinkSpun - Premier Adult Link Trading Community - ICQ - 464/\281/\250
Be Seen By New Webmasters/Affiliates * Target out webmasters/affiliates based on niches your sites are for less than $20 a month.
AmeriNOC - Proudly hosted @ AmeriNOC!
Jdoughs is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote