1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Make This My Homepage

Discussion in 'HTML & JavaScript' started by Black&Red, Jan 1, 2009.

  1. Black&Red

    Black&Red Jr. VIP Jr. VIP Premium Member

    Joined:
    Mar 14, 2008
    Messages:
    445
    Likes Received:
    248
    Location:
    Latvia
    Hello, I would like to know what kind of script I can use to add ''make this my homepage'' button to my site.
    Used Mother Google but didn't find anything good.

    Thanks!
     
  2. Tcm9669

    Tcm9669 Regular Member

    Joined:
    Dec 30, 2007
    Messages:
    369
    Likes Received:
    26
  3. aftershock2020

    aftershock2020 Senior Member

    Joined:
    Oct 19, 2007
    Messages:
    981
    Likes Received:
    477
    Nice try but this one is for a bookmark to favorites.

    Try this one.

    Just change the url to your proper domain name and paste this code into the body of your webpages ( without changing/removing the comments) :

    <!--[if IE]>
    <font face="Arial" size="3">
    <A HREF="#"
    onClick="this.style.behavior='url(#default#homepage)';
    this.setHomePage('http://www.codelifter.com');">
    Make CodeLifter Your Homepage
    </a>
    </font>
    <![endif]-->


    You can change the Href link to say or show whatever you want...it is marked as a " # " sign at present.
    Hope that helps.


     
    • Thanks Thanks x 1
    Last edited: Jan 1, 2009
  4. aftershock2020

    aftershock2020 Senior Member

    Joined:
    Oct 19, 2007
    Messages:
    981
    Likes Received:
    477
    Here is another one that is for a few more browsers that will do the job as well...

    <!-- ONE STEP TO INSTALL SET HOMEPAGE LINK:

    1. Copy the coding into your HTML document -->



    <BODY>

    <SCRIPT LANGUAGE="JavaScript">




    <!-- Begin
    // If it's Internet Explorer, use automatic link
    // Be sure to change the "http://www.YourWebSiteHere.com\"
    // to the URL you want them to bookmark.
    if (document.all){
    document.write('<A HREF="javascript:history.go(0);" onClick="this.style.behavior=\'url(#default#homepage)\';this.setHomePage(\'http://www.YourWebSiteHere.com\');">');
    document.write('<font size="5" color=6699FF face=arial>Click Here to Make My Web Page Your Homepage</font></a>');
    }

    // If it's Netscape 6, tell user to drag link onto Home button
    // Be sure to change the "http://www.YourWebSiteHere.com\"
    // to the URL you want them to bookmark.
    else if (document.getElementById){
    document.write('Drag this link onto your Home button to make this your Home Page.');
    }

    // If it's Netscape 4 or lower, give instructions to set Home Page
    else if (document.layers){
    document.write('Make this site your home page:
    - Go to Preferences in the Edit Menu.
    - Choose Navigator from the list on the left.
    - Click on the "Use Current Page" button.');
    }

    // If it's any other browser, for which I don't know the specifications of home paging, display instructions
    else {
    document.write('Make this site your home page:
    - Go to Preferences in the Edit Menu.
    - Choose Navigator from the list on the left.
    - Click on the "Use Current Page" button.');
    }
    // End -->
    </script>



    <center>
    <font face="arial, helvetica" size"-2">Free JavaScripts provided

    by The JavaScript Source</font>
    </center>



     
    • Thanks Thanks x 1