Library code snippets
Add a Bookmark
By Peeyush Nigam, published on 20 Mar 2002
The code below demonstrates some javascript code that adds a bookmark to the visitors IE favourites list. (Please note this *only* works in Internet Explorer)
<!-- ADD WEB PAGE IN TO FAVORITES LIST //-->
<Html>
<Head><title>Add in to favorites</title></Head>
<Body style="font-size:x-small">
<a href="javascript:window.external.AddFavorite('Pari Web Services™-One Stop shop for IT solutions','www.pari.4t.com')">Click to add this web page in to Favorite</a>
</Body>
</Html>
The AddFavorite function uses the following syntax:
window.external.AddFavorite(PageTitle,URL)
(the external object gives access to the Internet Explorer document object model).
Related articles
Related discussion
-
An old chestnut: Scrolling DIVs. Can I use onmouseover/onmouseout?
by Skunk (1 replies)
-
code highlighting using jquery
by pjm (1 replies)
-
Problem when using TemplateField and ImageButton
by mhuff84 (14 replies)
-
dropdownlist for country,state and city
by jack_tom (2 replies)
-
popup window in vb.net... how it's work?..
by yf2009 (6 replies)
Related podcasts
-
jQuery in ASP.NET
In this episode Chris Brandsma, Rick Strahl, Dave Ward, Bertrand Le Roy, Scott Koon, and Steven Harman discuss Microsoft's jQuery in ASP.NET announcement.This episode of the Alt.NET Podcast is brought to you by LLBLGen Pro, the most mature O/R mapper and code generator out there.Are you loo...
Events coming up
-
Oct
28
Web Standards Group (Sydney)
North Sydney, Australia
TBA
There are a couple errors in suggested code. This code works, plus it shows the URL on the status bar and blocks the link from being dragged.
<a
href="javascript:window.external.AddFavorite('http://www.domain.com', 'description')"
onMouseOver="window.status='http://www.domain.com'; return true;"
onMouseOut="window.status=''"
onDragStart="return false">
Add to Favorites
</a>
This thread is for discussions of Add a Bookmark.