48 users online (1 members and 47 guests)  

Thread: Bookmark Script


  Results 1 to 5 of 5

Related

  1. Some dofollow social bookmark websites are useful for website promotion    Forum: Search Engine Optimization - SEO - Forum
    Replies: 6
  2. Anyone know of a bookmark counter script?    Forum: Javascript Forum
    Replies: 2
  3. Javascript For BOOKMARK THIS WEBSITE    Forum: Javascript Forum
    Replies: 16
  4. How to add URL to favourites / bookmark    Forum: HTML Forum
    Replies: 3
  5. Replies: 7
  1. #1
    Ajax's Avatar
    New User

    Status
    Offline
    Join Date
    Dec 2002
    Posts
    15

    Bookmark Script

    I can't seen to get this bookmark script to work. Please help, thanks.

    <style type="text/css">
    <!--

    #fav {
    display:none;
    }
    button {
    width:210px;
    }

    //-->
    </style>

    <script type="text/javascript">
    <!--

    function favorites() {
    if(document.all) {
    document.getElementById("fav").style.display="block";
    }
    }
    onload=favorites;

    //-->
    </script>

    <div id="fav">
    <button onclick = "window.external.AddFavorite(location.href,document.title);">Add This Site To Your Favorites</button>
    </div>

  2. #2
    dlongnecker's Avatar
    Tired Student...(Z_z)

    Status
    Offline
    Join Date
    Aug 2004
    Location
    Wichita, KS
    Posts
    86
    Strange... it doesn't seem to like pulling the url and name while adding the favorite. I keep getting Permission denied in IE and FireFox just sits and stares at me... Odd.

    You could pre-populate it with:
    Code:
    <style type="text/css">
    <!--
    
    #fav {
    display:none;
    }
    button {
    width:210px;
    }
    
    //-->
    </style>
    
    <script type="text/javascript">
    <!--
    
    function favorites() {
    if(document.all) {
    document.getElementById("fav").style.display="block";
    }
    }
    onload=favorites;
    
    //-->
    </script>
    
    <div id="fav">
    <button onClick="javascript:window.external.AddFavorite('http://www.google.com','Google.com')">Add This Site To Your 
    
    Favorites</button>
    </div>
    I'll keep plugging around and see what I can find... I did a Google search for the permission denied error and it had quite a few hits for the addfavorites element...

    Back with more soon!

    Regards,

  3. #3
    Ajax's Avatar
    New User

    Status
    Offline
    Join Date
    Dec 2002
    Posts
    15
    Thanks for the help.

  4. #4
    Ajax's Avatar
    New User

    Status
    Offline
    Join Date
    Dec 2002
    Posts
    15
    I got the script to work but how do i center the bookmark button? Thanks.

    Place inside head:

    </style>
    <style type="text/css">

    #fav {
    display:none;
    }
    button {
    width:150px;
    }
    </style>

    <script type="text/javascript">

    function favorites() {
    if(document.all) {
    document.getElementById("fav").style.display="block";
    }
    }
    onload=favorites;

    </script>

    Place inside body:

    <div id="fav"><button onclick = "window.external.AddFavorite(location.href,document.title);">BOOKMARK THIS SITE</button>
    </div>

  5. #5
    dlongnecker's Avatar
    Tired Student...(Z_z)

    Status
    Offline
    Join Date
    Aug 2004
    Location
    Wichita, KS
    Posts
    86
    Ajax-

    Good to hear it's working...

    Under your #fav specification; add:

    Code:
    text-align:center;
    to align that DIV tag to the center.

    -David



Tags for this Thread