2010-05-03

Agregar a favoritos

nome gusta nada esto de agregar a favoritos. Pero si un cliente le gusta y no has conseguido evangelizarlo tenéis aquí el siguiente javascript:

<script type="text/javascript">
function Add_Bookmark_Favorite(url,title)
{
if (window.sidebar)
{ // Mozilla Firefox Bookmark
//Make sure "Load this bookmark in the sidebar is deselected
window.sidebar.addPanel(title, url,"");
return false;
}
else if( window.external )
{ // IE Favorites
window.external.AddFavorite( url, title);
return false;
}
else if(window.opera && window.print)
{ // Opera Bookmark
return !addToFav(url,title)
}
}
</script>


Y el enlace de Agregar a favoritos sería:

<a href="" title="" rel="sidebar" onclick="return Add_Bookmark_Favorite(location.href, document.title);">Agregar a favoritos</a>