Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

add to your favorites link


midpen

Recommended Posts

Posted

I added an "add to your favorites" link in information box:

 

<span STYLE="cursor:hand;" onclick = "window.external.AddFavorite(location.href, document.title);"> Add this site to your favorites

</span>

 

It only works on IE, doesn't work on firefox.

 

How to code it correctly?

 

And, I only want customers to bookmark my index page, not document.title, how to code it?

 

Thanks.

Posted

I added an "add to your favorites" link in information box:

 

<span STYLE="cursor:hand;" onclick = "window.external.AddFavorite(location.href, document.title);"> Add this site to your favorites

</span>

 

It only works on IE, doesn't work on firefox.

 

How to code it correctly?

 

And, I only want customers to bookmark my index page, not document.title, how to code it?

 

Thanks.

FireFox sidebar vs Add Favorites. I googled this one in moments, so it may or may not work for you:

 

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

 

And corresponding link:

 

<a href="#" onmousedown="addBookmark('Title','http://www.yoursite.com/')">Add this site to your favorites</a>

Posted

Thank you!

 

I added below in /includes/languages/english after defining:

 

define('NAVBAR_TITLE', 'Add to Your Favorites');
define('HEADING_TITLE', 'Add to Your Favorites');

define('TEXT_INFORMATION', '<span STYLE="cursor:hand;" onclick = "window.external.AddFavorite(location.href, document.title);"> Add this site to your favorites
</span>');
?>

 

It only works in IE and added the current page to the favorites.

 

I want to know how it should be coded in order to work in FF as well and I only need to add the homepage to the favorites.

 

I searched in google and tried, all script code does not work.

 

Anyone could help?

 

Thanks.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...