|
-
May 20th, 2002, 05:44 AM
#1
Adding to IE favourites menu through code?
How do I create a link that adds my page to the favourites menu of IE? For Netscape, I suppose it's Ctrl+D.
-
October 9th, 2002, 03:25 PM
#2
This will work for IE4+
<html>
<head>
<title>My page</title>
<script language="JavaScript" type="text/javascript">
function addToFavorite() {
window.external.AddFavorite(location.href, document.title);
}
</script>
</head>
<body>
<a href="#" onclick="addToFavorite(); return false">Add this page to favorites</a>
</body>
</html>
Documentation on AddFavorite() method:
http://msdn.microsoft.com/library/de...ddfavorite.asp
For Netscape, try to invoke the key code for control-D for the keydown event of the link.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|