Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 24-02-2009
Member
 
Join Date: Nov 2008
Posts: 1,066
add link to favorites

I am setting up a website and would like to add a link that allows the visitor to click to directly add my site to their favorites.

I did the test with this code (<a href="javascript:window.external.addfavorite('http://....','....')"> My site in your Favorites </a>), but when clicked nothing happens.

If someone with a tip.
Reply With Quote
  #2  
Old 24-02-2009
XSI XSI is offline
Member
 
Join Date: May 2008
Posts: 271
Re: add link to favorites

In any case, it seems to be a Microsoft specific (one more), which only works with Internet Explorer
Reply With Quote
  #3  
Old 24-02-2009
Member
 
Join Date: May 2008
Posts: 945
Re: add link to favorites

"Window.external.addfavorite" does not work with IE7! It is sad indeed!
Reply With Quote
  #4  
Old 25-02-2009
Member
 
Join Date: Feb 2008
Posts: 194
Re: add link to favorites

<html>
<head>
<- START OF SCRIPT FAVORITES ->
<script type="text/javascript">
function favorites (title, url) {
if (window.sidebar) {window.sidebar.addPanel (title, url, "");} // Firefox
else if (window.opera && window.print)
{// Opera
var item = document.createElement ('a');
item.setAttribute ('href', url);
item.setAttribute ('title', title);
item.setAttribute ('rel', 'sidebar');
item.click ();
}
else if (window.external) // ie other than IE7
{
window.external.AddFavorite (url, title);
}
}
</script>
<- END OF SCRIPT FAVORITES ->
</head>
<body>
<a href="javascript:favorites('put here the name of the site','put here the URL of the site')">
<img src="favorites.gif" width="20" height="17" ALIGN="middle" title="Add [site name] To Favorites" border="0">
</a>
</body>
</html>
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags:



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "add link to favorites"
Thread Thread Starter Forum Replies Last Post
Internet Explorer 8: Favorites save the same link two times Dechen Technology & Internet 4 19-02-2011 01:56 PM
Connecting TP-Link modem to TP-Link router Rufta Technology & Internet 3 02-02-2011 01:50 PM
Changing link color when moving mouse over link in HTML Cade Software Development 5 22-01-2010 07:46 PM
How to remove "Favorites" drop down tag in "Favorites Bar" in IntExp 8? kyosang Windows XP Support 2 18-05-2009 07:15 AM
D-Link DIR-655, Intel WiFi Link 4965a/g/n, Vista and 802.11n CaspaR Windows Vista Network 1 14-07-2007 04:03 PM


All times are GMT +5.5. The time now is 01:27 AM.