adding a book mark

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • bluerovers
    Sergeant Major

    • Aug 2007
    • 98

    adding a book mark

    hey all

    im trying too add a bookmark me button on my page and fell i am lost

    i downloaded the following code from a website

    bookmark(address,sitename) {
    if (window.sidebar) {
    window.sidebar.addPanel(sitename, address,"");
    } else if( document.all ) {
    window.external.AddFavorite(address, sitename);
    } else if( window.opera && window.print ) {
    return true;
    }
    }

    it also says to place this in the html header

    script type="text/javascript" src="addToFavorites.js"></script>

    and this in the body

    <a href="#" onclick="bookmark('http://javascript.internet.com/','JavaScript Source')">Bookmark our site!</a>

    i know it sounds bumb but not overly sure how to do this?

    thanks

    bluerovers
    www.bluerovers.co.nz
    bluerovers
    www.bluerovers.co.nz
    www.five-a-side.co.nz
  • Collectors-info
    General

    • Feb 2006
    • 8703

    #2
    Re: adding a book mark

    1st part.
    Click on View>Page Html>Between the head, & enter this part of the code.


    <script type="text/javascript" src="addToFavorites.js"></script>

    2nd part
    Click & open the scripts button. & d/click on the script box to open. Check the radio button Java script. And enter code below.


    /* This script and many more are available free online at
    The JavaScript Source!! http://javascript.internet.com
    Created by:http://www.webbiesite.com */
    function bookmark(address,sitename) {
    if (window.sidebar) {
    window.sidebar.addPanel(sitename, address,"");
    } else if( document.all ) {
    window.external.AddFavorite(address, sitename);
    } else if( window.opera && window.print ) {
    return true;
    }
    }


    Part 3.
    Click on html box & d/click to open html properties. Enter this code.

    <a href="#" onclick="bookmark('http://javascript.internet.com/','JavaScript Source')">Bookmark our site!</a>


    Press preview to test.


    Good luck.
    PS, You will only see the Bookmark this site text.
    Regards Chris.

    Collectables, Collecting, collectors-info.com

    www.chrismorris.co.uk

    House build project

    Comment

    • calvinngsc
      Private First Class

      • Aug 2007
      • 5

      #3
      Re: adding a book mark

      Hi Chris,

      Your above step really helps.

      Thanks

      Calvin

      Comment

      • Collectors-info
        General

        • Feb 2006
        • 8703

        #4
        Re: adding a book mark

        Pleasure!
        Regards Chris.

        Collectables, Collecting, collectors-info.com

        www.chrismorris.co.uk

        House build project

        Comment

        • bluerovers
          Sergeant Major

          • Aug 2007
          • 98

          #5
          Re: adding a book mark

          collector..........you rock cheers buddy

          bluerovers
          bluerovers
          www.bluerovers.co.nz
          www.five-a-side.co.nz

          Comment

          • bluerovers
            Sergeant Major

            • Aug 2007
            • 98

            #6
            Re: adding a book mark

            hi as ive said, the help you get from people on this forum is first class! so i'd just like to trouble you good people again. with the above code could anyone tell me how to change thew colour of 'bookmark this site' as it is blue and i wouldn't mid a different colour

            thanks in advance

            bluerovers
            bluerovers
            www.bluerovers.co.nz
            www.five-a-side.co.nz

            Comment

            • Collectors-info
              General

              • Feb 2006
              • 8703

              #7
              Re: adding a book mark

              Hi, try this.

              <a href="#" onclick="bookmark('http://javascript.internet.com/','JavaScript Source')"><font color="green">Bookmark our site!</font></a>

              You can change the green part to a #000000 style if you want.
              Regards Chris.

              Collectables, Collecting, collectors-info.com

              www.chrismorris.co.uk

              House build project

              Comment

              • noritauhidi
                Corporal

                • Nov 2007
                • 10

                #8
                Re: adding a book mark

                Hey this worked excellent for my site on internet explorer. However when I try to use it in mozilla firefox, I can save the bookmark but when I open it, it opens it in the side bar instead of the main part of the browser. Any suggestions? I'd greatly appreciate it, I've been trying to fix this for hours.

                Comment

                Working...
                X