Forum Moderators: open

Message Too Old, No Replies

HTML for bookmarking a page

Bookmarking HML

         

Fortune Hunter

2:28 am on Feb 23, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Does anyone know what the HTML I have to add to a graphic or button would be to have it bookmarked when the user clicks on it?

Fortune Hunter

BlobFisk

9:31 am on Feb 23, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



A search using your favourite search engine for "bookmark script" should yield some helpful results.

le_gber

10:16 am on Feb 23, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It'll probably be some javascript though not HTML so don't be put off!

walrus

4:14 pm on Feb 23, 2006 (gmt 0)

10+ Year Member



The script part goes in the head section.

<script language="JavaScript1.2">
var bookmarkurl="http://www.yoursite.com";
var bookmarktitle="Your Site Name";

function addbookmark(){
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarktitle);
}

</script>

<a href="javascript:addbookmark()"><b>Bookmark this site!</b></a>

Fortune Hunter

4:25 pm on Feb 23, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



All:

Thank you for the tip, I guess I should have thought of that myself. I did as you suggested and found some scripts. The script works fine if I just dump it in a page, but I really want to assign the script to an image or graphic on the page like a picture or graphic. When I try that is doesn't work properly. I thought if someone looked at what I was doing they could spot the error.

Here is the script I found

<a href="javascript:window.external.AddFavorite('http://simplythebest.net/scripts/', 'SimplytheBest DHTML Scripts & Javascripts')">
<font face="Arial" size="2">Add SimplytheBest DHTML Scripts and Javascripts to your favorites</font></a>

Here is how I am putting it in my page with the graphic image, where it isn't working right...

<p><a href="%3Ca%20href=%22javascript:window.external.AddFavorite(%27http://simplythebest.net/scripts/%27,%20%27SimplytheBest%20DHTML%20Scripts%20&%20Javascripts%27)%22%3E"><img src="Images/submit_button.gif" width="117" height="24" border="0"></a></p>

If either of you can look at this and see how to assign this script to the graphic and have it work please let me know. Thanks!

Fortune Hunter

walrus

6:58 pm on Feb 23, 2006 (gmt 0)

10+ Year Member



I don't kniow java but maybe it is that you are accessing a remote script and you are trying to embed a local attribute in it or that the replacement of % and numbers in the path for spaces doesnt work.
If you try the one i posted with a local hosted pic instead of text it should work fine.
Good Luck

walrus

8:52 pm on Feb 23, 2006 (gmt 0)

10+ Year Member



Rats, to late to edit, should a known better than to try to advise on this. Of course its not an external script, pardon my post.