how do you implement a "add to favorites script" without all the security hassle?

Status
Not open for further replies.

Aveligand

New member
Jun 11, 2007
207
1
0
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>
 


Are you testing this locally? Windows does not like javascript when you're looking at a file on your computer. Over the internet it's fine.
 
Status
Not open for further replies.