oracleguy
10-05-2002, 08:41 AM
I have this code in the head of my page:
<script language="JavaScript">
function addfav(favurl, favtitle){
if (document.all)
{
window.external.AddFavorite(favurl,favtitle)
alert (favtitle+" has been added to your favorites.")
}
}
</script>
And I have a hyperlink in my body like:
<a href="javascript:addfav('www.bawls.com','Bawls Guarana')">Add To Favorites</a>
When I click the link i get the error: "unspecified error" on the window.external line. I've just start learning JS a few weeks ago and I'm still learning; whats wrong with this script?
<script language="JavaScript">
function addfav(favurl, favtitle){
if (document.all)
{
window.external.AddFavorite(favurl,favtitle)
alert (favtitle+" has been added to your favorites.")
}
}
</script>
And I have a hyperlink in my body like:
<a href="javascript:addfav('www.bawls.com','Bawls Guarana')">Add To Favorites</a>
When I click the link i get the error: "unspecified error" on the window.external line. I've just start learning JS a few weeks ago and I'm still learning; whats wrong with this script?