PDA

View Full Version : I Need a Code



Skyline969
12-12-2006, 02:22 PM
OK, what's the html code that I would use on my site to allow someone to bookmark the page? I want it so I have the words "Bookmark this site now" and when you click on them it bookmarks the page.

jscheuer1
12-12-2006, 02:29 PM
This cannot be done reliably in all browsers. Here is a way to do it in most:

http://www.dynamicdrive.com/dynamicindex9/addbook.htm

But consider this, your users are already 'allowed' to bookmark yours, or any other sites.

chechu
12-12-2006, 04:22 PM
Or just this ?

<a href=":%20Add%20to%20my%20favorites%20folder" onClick="window.external.AddFavorite(&quot;yoursite.com&quot;,&quot;nameofsite&quot;);return false">bookmark this site</a>

jscheuer1
12-12-2006, 04:40 PM
Or just this ?

<a href=":%20Add%20to%20my%20favorites%20folder" onClick="window.external.AddFavorite(&quot;yoursite.com&quot;,&quot;nameofsite&quot;);return false">bookmark this site</a>


Which browsers will that work in?

chechu
12-13-2006, 10:59 AM
To my knowledge, in all.
Anyone different experience ?

jscheuer1
12-13-2006, 01:27 PM
To my knowledge, in all.
Anyone different experience ?

Have you ever used any browser other than IE? If so, does this work in any of them?

Added later:

BTW - As far as I know, the window.external object only exists in IE.

chechu
12-14-2006, 03:05 PM
I have no experience with other browsers, but I once asked others to check my site in different browsers, and it all seems fine.
Therefore: Anyone different experience ? Can anyone try this in other browsers than IE, please ?

jscheuer1
12-14-2006, 05:22 PM
I have no experience with other browsers, but I once asked others to check my site in different browsers, and it all seems fine.
Therefore: Anyone different experience ? Can anyone try this in other browsers than IE, please ?

Doesn't work.

chechu
12-15-2006, 10:22 AM
Good to know !
I adapted my site to the one of DD.

mburt
12-15-2006, 08:12 PM
I've seen it work in plenty of websites, and it works for FF and IE.
Check out www.GameWinners.com
They even have Ctrl+D enabled to activate.

jscheuer1
12-15-2006, 10:05 PM
I've seen it work in plenty of websites, and it works for FF and IE.
Check out www.GameWinners.com
They even have Ctrl+D enabled to activate.

Which code?

chechu
12-16-2006, 11:54 PM
<SCRIPT LANGUAGE="javascript">
if (navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion >= "4.0")
{document.write("<SPAN STYLE='cursor:hand' onClick='window.external.AddFavorite(location.href, document.title);'><FONT COLOR=#CC0000 FACE='verdana,arial,helvetica,sans-serif' size=1><B><U>ADD US TO YOUR FAVORITES</U></B></FONT></SPAN>")}
else
{document.write("<FONT COLOR=#CC0000 FACE='verdana,arial,helvetica,sans-serif' size=1><B>PRESS CTRL-D TO BOOKMARK OUR SITE</B></FONT>")}

</SCRIPT>

jscheuer1
12-17-2006, 12:57 AM
<SCRIPT LANGUAGE="javascript">
if (navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion >= "4.0")
{document.write("<SPAN STYLE='cursor:hand' onClick='window.external.AddFavorite(location.href, document.title);'><FONT COLOR=#CC0000 FACE='verdana,arial,helvetica,sans-serif' size=1><B><U>ADD US TO YOUR FAVORITES</U></B></FONT></SPAN>")}
else
{document.write("<FONT COLOR=#CC0000 FACE='verdana,arial,helvetica,sans-serif' size=1><B>PRESS CTRL-D TO BOOKMARK OUR SITE</B></FONT>")}

</SCRIPT>

I rest my case, window.external is for IE only and:


Or just this ?

<a href=":%20Add%20to%20my%20favorites%20folder" onClick="window.external.AddFavorite(&quot;yoursite.com&quot;,&quot;nameofsite&quot;);return false">bookmark this site</a>


was the code at issue originally. It has no fall back and nothing to prevent other browsers from throwing an error when they encounter it. The DD script will make a bookmark of sorts in FF and some other Gecko based browsers, as well as bookmark in IE. My real point though, was that the user may bookmark at any time and doesn't really need help.

chechu
12-17-2006, 03:04 PM
Of course the user can bookmark the page at any time, but this is a sales trigger, getting closer to the customer, familiarising. Interactivity boosts sales.

jscheuer1
12-17-2006, 05:02 PM
Of course the user can bookmark the page at any time, but this is a sales trigger, getting closer to the customer, familiarising. Interactivity boosts sales.

Sales are certainly not aided by code that doesn't work and especially not by code that throws errors. I also am not convinced that working code of this type would help sales. It might alienate as many, if not more, potential customers than it would facilitate. Many folks find it obnoxious when a site starts trying to manage things that they are perfectly capable of deciding upon and executing themselves if the want to. It can be seen as pushy, a sign that the seller and/or the site is not to be trusted.