Need Help Frontpage user, java script for bookmarking not working

Discussion in 'JavaScript' started by Tabs, Mar 4, 2007.

  1. #1
    I am trying to set up simple bookmarking button for my website and I keep getting this error message ('window.external' is null or not an object) I have tried everything.

    Here is the issue, I am trying to set it up in a shared border so I dont have to manually enter the code on each page. Sounds easy enough.

    Also prior to the bright insight I got over seven hours ago to make changes to the site, I had a bookmarking button on my homepage only but I took it off when i started fiddling around today and I don't remember how I got it to work, cause I did it months ago.

    Please if you have any idea what is going on or how I can fix it please help me.

    Thanks for your mercy.
     
    Tabs, Mar 4, 2007 IP
  2. ajsa52

    ajsa52 Well-Known Member

    Messages:
    3,426
    Likes Received:
    125
    Best Answers:
    0
    Trophy Points:
    160
    #2
    I'm using a function like this:
    
    function f_addBookmark( )
    {
      var bookmarkurl;
      var bookmarktitle;
      
      bookmarkurl = "http://www.YourSite.com";
      bookmarktitle="Your Site Title";
    
      if (window.sidebar) 
      { 
        // Mozilla Firefox Bookmark		
        window.sidebar.addPanel( bookmarktitle, bookmarkurl, "" );	
      } 
      else if( window.external ) 
      { 
        // IE Favorite		
        window.external.AddFavorite( bookmarkurl, bookmarktitle ); 
      }
    }
    
    Code (markup):
     
    ajsa52, Mar 4, 2007 IP
  3. Tabs

    Tabs Peon

    Messages:
    164
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks Ajsa52, the problem I am having is with the window.external part of the code.

    I am using the code from dynamic drive and it keeps coming up with an error code.

    Thanks
     
    Tabs, Mar 4, 2007 IP
  4. Aragorn

    Aragorn Peon

    Messages:
    1,491
    Likes Received:
    72
    Best Answers:
    1
    Trophy Points:
    0
    #4
    The code from DD works fine for me. There maybe some other problem with the script you are using. Try to provide a demo or provide the code you use.
     
    Aragorn, Mar 5, 2007 IP