/    Sign up×
Community /Pin to ProfileBookmark

Firefox Javascript Bookmark Problem

hey i am using this script for my bookmarking on my web page and it works fine in IE but in fire fox i get this problem: the bookmark window pops up and makes the bookmark fine but when i go to the bookmarks menu in Firefox and click on the bookmark the link opens up in the sidebar, and for me to stop it from doing that i have to go to the bookmarks property’s and un tick the box that says “Load this bookmark in the sidebar” so the problem is with this script that when you use it in FF it automatically has the “Load this bookmark in the sidebar” box ticked, is there away to make it work? anyone

Here is the code

This is in the <Head>

[CODE]<script type=”text/javascript”>
function bookmarksite(title, url){
if (document.all)
window.external.AddFavorite(url, title);
else if (window.sidebar)
window.sidebar.addPanel(title, url, “”)
}

</script>[/CODE]

This is linked to a bookmark image on my web page.

[CODE]javascript:bookmarksite(‘SW-Writers’, ‘http://www.hectik17.freeserverhost.com’)[/CODE]

Could someone please help asap, Thank you.

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@mrhooJan 30.2007 — That's what you told it to do:

[B]window.sidebar.addPanel[/B](title, url, "")

And many users of Firefox, Opera and IE7 don't allow scripted bookmarks at all.
Copy linkTweet thisAlerts:
@Hectik17authorJan 30.2007 — Would you behable to tell me how to not make it popup in the side bar but still work in IE ? Thx.
Copy linkTweet thisAlerts:
@felgallJan 30.2007 — if (window.external)

window.external.AddFavorite(location.href, document.title);
Copy linkTweet thisAlerts:
@Hectik17authorJan 30.2007 — if (window.external)

window.external.AddFavorite(location.href, document.title);[/QUOTE]


[CODE]<script type="text/javascript">
function bookmarksite(title, url){
[B]if (window.external)
window.external.AddFavorite(location.href, document.title);[/B]
else if (window.sidebar)
window.sidebar.addPanel(title, url, "")
}

</script>[/CODE]


dont work mate ?
×

Success!

Help @Hectik17 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.22,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...