Clicky

I'm using this:

 <a href="javascript:addbookmark()"><img alt="Bookmark" src="/v/vspfiles/templates/115/images/buttons/btn_bookmark.gif" /></a>                             
1: 

Select allOpen in new window



to allow visitors to book mark individual pages on my site. However this doesn't work for browsers like Chrome or Safari. Why is that and how can I work around this?

asked 12/14/2011 06:55

vacpartswarehouse's gravatar image

vacpartswarehouse ♦♦


6 Answers:
Chrome just happens to explicitly disallow this behavior.  Google claims it is for security reason, but I think they would rather you have to do a search.  I suspect safari does as well, as they share some of the Google code base. Also don't be surprised if it quits working in Firefox.  Most users object to auto bookmarking via script because it can be fired without their explicit permission; And it is a security hole that needs to be closed.

Cd&
link

answered

COBOLdinosaur's gravatar image

COBOLdinosaur

Here is a script I found that works in all browsers:
http://www.dynamicsitesolutions.com/javascript/add-bookmark-script/
link

answered 2011-12-14 at 15:05:58

nap0leon's gravatar image

nap0leon

LOL... unbelievable a 6k script to make a web page less secure.  Kaspersky reports that today was the first time they saw it, so fortunately it is not in wide use, and it has an easy to spot signature that will be easy to block.


Cd&
link

answered 2011-12-14 at 15:13:07

COBOLdinosaur's gravatar image

COBOLdinosaur

Try this One

<a href="javascript:if(document.all)window.external.AddFavorite(location.href,document.title); ">Add this page</a>
link

answered 2011-12-14 at 19:31:46

godlymathew's gravatar image

godlymathew

-godlymathew: When I plug this in and click the link nothing happens.
link

answered 2011-12-15 at 01:32:05

vacpartswarehouse's gravatar image

vacpartswarehouse

"AddFavorite" works on IE.  The other major browsers require different implementations.

(Hence the ungodly script I linked earlier... which works with Firefox 8, IE 8, Opera 11.6, Chrome 16, and Safari 5.1.2 on Windows XP.  I tried 5 or 6 others, but they all failed on one or more browsers.)
link

answered 2011-12-15 at 07:21:31

nap0leon's gravatar image

nap0leon

Your answer
[hide preview]

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Tags:

×104
×125

Asked: 12/14/2011 06:55

Seen: 313 times

Last updated: 12/15/2011 01:38