Bookmark Us and Set As Homepage

Discussion in 'Programming' started by ehostingcomplete, Mar 30, 2005.

to remove all ads.
  1. ehostingcomplete

    ehostingcomplete New Member

    Messages:
    42
    hello again :)

    does anybody know the code to:

    1) bookmark the current page when a link is clicked?
    2) Set the website as homepage at click of the button?
    3) set the homepage on page load?

    thanks
     
  2. WTM

    WTM New Member

    Messages:
    10
    Here is the code for "Bookmark Us":
    <a href="javascript:window.external.AddFavorite('http://YourSite.com', 'Your Great Website')" >Bookmark Us</a>

    Here is set home page:

    <a href="#" onclick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://yoursite.com');" style="font-size:12px;color:#ffffff;font-family:verdana;">Make us Your Home Page</a>
     
  3. Dmexio

    Dmexio New Member

    Messages:
    17
    give us a message

    Try using this code, it wont work with firefox but at least they get a message letting them know, dont leave the rest of us wondering why the link did not work, it works perfect with IE.

    <html>
    <head>
    <script language="JavaScript" type="Text/Javascript"><!--
    // Hide script from older browsers
    var urlAddress = "http://www.your site.com";
    var pageName = "Add your site title";

    function addToFavorites()
    {
    if (window.external)
    {
    window.external.AddFavorite(urlAddress,pageName)
    }
    else
    {
    alert("Sorry! Your browser doesn't support this function.");
    }
    }
    // --></script>
    <title>your site title</title>
    </head>

    <body>


    <a href="javascript:addToFavorites()">click here</a>
    </body>
    </html>
    ________
    COLORADO MEDICAL MARIJUANA DISPENSARIES
     
    Last edited: Aug 14, 2011

Share This Page