Welcome to WebmasterWorld Guest from 54.159.214.27

Forum Moderators: incrediBILL

Bookmark us doesn't work in Firefox

but work in IE

   
6:04 pm on Apr 28, 2007 (gmt 0)

5+ Year Member



I have a website and the link Bookmark us work in IE,but does't work in Firefox
<a href="#" onClick="window.external.AddFavorite(location.href,document.title);">Bookmark us</a>

Error :
window.external has no properties
What should i do?

7:49 pm on Apr 28, 2007 (gmt 0)

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Yes, that script is IE only.

I've seen scripts that claim to work on other browsers including Firefox, but what they do is open up the side panel and the user still needs to create the bookmark manually. If you want to display such a link, I would suggest scripting it so that in only displays in IE -- and then call it "Add to Favorites" which is Microsoft-speak (they like to rename things.)

11:35 am on May 1, 2007 (gmt 0)

WebmasterWorld Senior Member dreamcatcher is a WebmasterWorld Top Contributor of All Time 10+ Year Member



You could try this one at Dynamic Drive:
[dynamicdrive.com...]

dc

1:07 pm on May 5, 2007 (gmt 0)

5+ Year Member



That one claims to work in Firefox, but when the bookmark is visited it loads in the sidebar... not the main window.

I've tried a few times to find a fix but was told on the Mozilla forums there was no way to do this.

6:56 am on May 23, 2007 (gmt 0)

WebmasterWorld Senior Member dreamcatcher is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Try this:

<script type="text/javascript">
function bookmarksite(title,url){
if (window.sidebar)
window.sidebar.addPanel(title, url, "");
else if(window.opera && window.print){
var elem = document.createElement('a');
elem.setAttribute('href',url);
elem.setAttribute('title',title);
elem.setAttribute('rel','sidebar');
elem.click();
}
else if(document.all)
window.external.AddFavorite(url, title);
}
</script>

And then:
<a href="javascript:bookmarksite('Your Website', 'http://www.example.com')">Add</a>

dc

[edit] Sorry, that does the sidebar thing too. Looks like it has to be the sidebar.

2:24 pm on Jun 1, 2007 (gmt 0)

WebmasterWorld Senior Member piatkow is a WebmasterWorld Top Contributor of All Time 5+ Year Member



Bookmark scripts look a bit cheesy anyway. There are perfectly good utilities shipped with the browser for bookmarking pages.
10:13 pm on Jun 13, 2007 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



Automated bookmarking is not a good idea. If a person wants to bookmark a site, they do it themselves, I just don't understand why it's done any other way.
If you want the person to bookmark your site, just ask them to.
10:19 pm on Jun 13, 2007 (gmt 0)

5+ Year Member



A little bookmark button is not such a big hassle and it is a nice after thought, I suspect that it must increase your bookmark-age by between 25% - 50% not all people think the same and to have a little button that just does it for you, well why not..
 

Featured Threads

My Threads

Hot Threads This Week

Hot Threads This Month