Add a Bookmark button.

  • 1
  • Question
  • Updated 7 years ago
  • Answered
Just opened a site recently and I want to know if there is a way to have a potential client bookmark my site right from my site?
Photo of todd mcaneeley

todd mcaneeley

  • 1 Post
  • 0 Reply Likes

Posted 7 years ago

  • 1
Photo of Justine

Justine

  • 751 Posts
  • 45 Reply Likes
Hello todd mcaneeley,

To add this to your site it requires you to add two sets of HTML code to your page.

Step 1 - drag and drop an HTML Widget at the top of your page. Paste in the following code:

<script type="text/javascript">

/***********************************************
* Bookmark site script- © Dynamic Drive DHTML code library (<a href="http://www.dynamicdrive.com">www.dynamicdrive.com</a>)
*
This notice MUST stay intact for legal use
* Visit Dynamic Drive at <a href="http://www.dynamicdrive.com/">http://www.dynamicdrive.com/</a> for full source code
***********************************************/

/* Modified to support Opera */
function bookmarksite(title,url){
if (window.sidebar) // firefox
window.sidebar.addPanel(title, url, "");
else if(window.opera && window.print){ // opera
var elem = document.createElement('a');
elem.setAttribute('href',url);
elem.setAttribute('title',title);
elem.setAttribute('rel','sidebar');
elem.click();
}
else if(document.all)// ie
window.external.AddFavorite(url, title);
}
</script>

Step 2 - Drag and drop your second HTML Widget onto your page. Paste in the following code:

<a title="Bookmark this site" href="javascript:bookmarksite('Enter your text here',
'http://mysitesURL.com')"><img style="margin: 0px; padding: 0px;" src="resources/bookmark.jpg" alt=" bookmark star" border="0"></a>

You need to change the following info:

* Change "Enter your text here" to you own wording.
* Change "http://mysitesURL.com" to the URL of your site.
* Upload your image to your File Manager and change the src="resources/bookmark.jpg" to your own image name.

I hope this helps!