how do you implement a "add to favorites script" without all the security hassle?
So I'm trying to make a "add to favorites" link for one of my sites. But everything I try to preview them in dream weaver with I.E I get a security warning saying "I.E has restricted the file from showing active content that could access your computer" and it won't work with firefox on default setting at all.
I can't help but think this will freak a lot of users away.
How do you get around this problem? Here's the code I'm using:
<script type="text/javascript">
function favit(heading,address){
if(window.external)window.external.AddFavorite(address,heading);
else if(window.sidebar)window.sidebar.addPanel(heading,address,"");
}
</script>
<a href="javascript:favit(document.title,location.href)">Add to favorites</a>
So I'm trying to make a "add to favorites" link for one of my sites. But everything I try to preview them in dream weaver with I.E I get a security warning saying "I.E has restricted the file from showing active content that could access your computer" and it won't work with firefox on default setting at all.
I can't help but think this will freak a lot of users away.
How do you get around this problem? Here's the code I'm using:
<script type="text/javascript">
function favit(heading,address){
if(window.external)window.external.AddFavorite(address,heading);
else if(window.sidebar)window.sidebar.addPanel(heading,address,"");
}
</script>
<a href="javascript:favit(document.title,location.href)">Add to favorites</a>