SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Evangelist
    Join Date
    Oct 2001
    Posts
    441
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question any idea what is wrong with this bookmarking js?

    Put this in the head of the HTML code:

    Code:
    <script language="JavaScript" type="text/javascript">
      // Bookmark script
      var urlAddress = "www.yourdomain.com";
      var pageName = "your domain name";
      function addToFavorites() {
      if (window.external) {
      window.external.AddFavorite(urlAddress,pageName)
      } else {
      alert("Sorry, your browser doesn't support this function...\n\Please close this alert and press Control + D to bookmark");
      }
      }
      </script>
    And this in the body:

    Code:
      
      <a href="javascript:addToFavorites()">Bookmark GoToAd</a>

    It works in Firefox but I get an error message in Internet Explorer.

    thanks.

  2. #2
    You talkin to me? Anarchos's Avatar
    Join Date
    Oct 2000
    Location
    Austin, TX
    Posts
    1,438
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You need to add a http:// in front of the url.
    ck :: bringing chris to the masses.

  3. #3
    SitePoint Evangelist
    Join Date
    Oct 2001
    Posts
    441
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you for taking the time to reply Anarchos! It works!!


Bookmarks

Posting Permissions

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