add/favorites

J

james

I cannot get a simple book mark to work
<a href="javascript:addbookmark()">Bookmark this site!</a>

Is this the right <head> code ?
<script language="JavaScript">

function addbookmark(){
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarktitle)
}

</script>
 
J

Jens Peter Karlsen[FP MVP]

You are not calling the function correctly. As you can see it expects
two parameters and you don't supply any.
Try something like this:
<a href="javascript:addbookmark("http://www.mydomain.com/", "My cool
site")">Bookmark this site!</a>

function addbookmark(bookmarkurl,bookmarktitle){
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarktitle)
}

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top