locked
Create a link with a bookmark????? RRS feed

  • Question

  • User-4283455 posted

    How do you create a bookmark that is the landing page of a page that holds the link?

    Is this even possible?

     

    <a href="link + bookmark og landing page">Landing Page</a> 

     

     

    Thanks Jonny~

    Friday, August 29, 2008 3:37 AM

Answers

  • User-4283455 posted

    Hey mbischoff, can you give me an example of this

    <asp:hyperlink id="link1" runat="server" NavigateUrl="javascript:addBookmark('my page', document.location.href)" Text="Add bookmark" />

    Pointing at www.google.com

    Please~

    Jonny

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, August 29, 2008 6:32 PM
  • User-157675511 posted

    Try this:

    <script type="text/javascript">
        function addBookmark(title, url) {
            if (window.sidebar) { // firefox
                window.sidebar.addPanel(title, url, "");
            } else if (document.all) { // ie
                window.external.AddFavorite(url, title);
            } else if (window.opera && window.print) {
                return true;
            }
        }
    </script>

    <asp:hyperlink id="link1" runat="server" NavigateUrl="javascript:addBookmark('my page', 'http://www.google.com')" Text="Add bookmark for google.com" />

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, August 29, 2008 7:56 PM

All replies

  • User-157675511 posted

    Hi, you can use code like this:

    <script type="text/javascript">
        function addBookmark(title, url) {
            if (window.sidebar) { // firefox
                window.sidebar.addPanel(title, url, "");
            } else if (document.all) { // ie
                window.external.AddFavorite(url, title);
            } else if (window.opera && window.print) {
                return true;
            }
        }
    </script>

    and:

    <a href="javascript:addBookmark('my page', document.location.href)">Add bookmark</a>

    or

    <asp:hyperlink id="link1" runat="server" NavigateUrl="javascript:addBookmark('my page', document.location.href)" Text="Add bookmark" />
     

    Friday, August 29, 2008 4:14 AM
  • User-4283455 posted

    I could not get them to work

     

    I tried all 3

    mbichoff

     

    ~J

    Friday, August 29, 2008 4:19 AM
  • User-4283455 posted

    Hey mbischoff, can you give me an example of this

    <asp:hyperlink id="link1" runat="server" NavigateUrl="javascript:addBookmark('my page', document.location.href)" Text="Add bookmark" />

    Pointing at www.google.com

    Please~

    Jonny

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, August 29, 2008 6:32 PM
  • User-157675511 posted

    Try this:

    <script type="text/javascript">
        function addBookmark(title, url) {
            if (window.sidebar) { // firefox
                window.sidebar.addPanel(title, url, "");
            } else if (document.all) { // ie
                window.external.AddFavorite(url, title);
            } else if (window.opera && window.print) {
                return true;
            }
        }
    </script>

    <asp:hyperlink id="link1" runat="server" NavigateUrl="javascript:addBookmark('my page', 'http://www.google.com')" Text="Add bookmark for google.com" />

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, August 29, 2008 7:56 PM
  • User-4283455 posted

    I swear Itried that

    Sorry for pretty dumb Q?

    Thanks Much Again!!!! 

    Jonny

    Friday, August 29, 2008 8:23 PM