![]() |
|
|||||||
| Final Fantasy | Final Fantasy Forums | Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 1001001011 Come to this forum to get technical help, or just discuss technology as a whole; computers, electronics, phones, and other accessories that make us drool. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Senior Member
|
Ok... Let's say that someone (me) wants to create one of those nifty little "Bookmark this site!" links so that all one has to do is click the link and boom! Bookmarked.
So here's what I'm using (not my code... javascript really isn't my thing. I found this in a script library.): Code:
<script type="text/javascript">
function bookmarksite(title,url){
if (window.sidebar) // firefox
window.sidebar.addPanel(title, url, "");
else if(window.opera && window.print){ // opera
var elem = document.createElement('a');
elem.setAttribute('href',url);
elem.setAttribute('title',title);
elem.setAttribute('rel','sidebar');
elem.click();
}
else if(document.all)// ie
window.external.AddFavorite(url, title);
}
</script>
Code:
<li><a href="javascript:bookmarksite('My Site','http://www.mysite..com')">Bookmark Us!</a></li>
And while we're on the subject... WHY DOES SAFARI SUCK SO MUCH?! I have to fight with it constantly when if comes to the nifty things everyone else supports. :P |
|
|
|
|
|
#2 (permalink) |
|
BOOM HEADSHOT!
Join Date: Jan 2007
Age: 22
Posts: 299
Rep Power: 4
![]() |
According to this page, only IE allows a site to add itself to a favorites link :/. Haven't been able to find anything either using Googol, but I'm sure you already tried that.
Either all the stuff I found are carbon-copies of the one you posted above, and/or they haven't been tested in Safari. In other words, from what I've seen all you can do is show a message about how to add the page to the user's bookmarks in Safari when the browser is Safari. |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Har Di Fucking Har Har | King Hydro | Green Eggs and SPAM | 23 | 06-25-2007 11:48 PM |
| ''You're fucking stupid.'' | Ugly Casanova | Gathering Square | 18 | 06-02-2007 11:31 PM |
| You're all fucking twats | Naked Gackt | Green Eggs and SPAM | 19 | 05-16-2007 04:49 PM |
| How fucking sad | Jak | Green Eggs and SPAM | 16 | 03-20-2007 11:27 AM |
| WHAT THE FUCKING HELL IS UP WITH THAT? | I AM THE CAPS MONSTER | Feedback & Inquiry | 11 | 02-21-2007 07:28 PM |