wu :: forums
« wu :: forums - book mark this site »

Welcome, Guest. Please Login or Register.
Nov 28th, 2024, 12:32pm

RIDDLES SITE WRITE MATH! Home Home Help Help Search Search Members Members Login Login Register Register
   wu :: forums
   riddles
   general problem-solving / chatting / whatever
(Moderators: towr, Eigenray, Icarus, SMQ, william wu, Grimbal, ThudnBlunder)
   book mark this site
« Previous topic | Next topic »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: book mark this site  (Read 432 times)
mfirmata
Newbie
*



Don't read this

   


Gender: male
Posts: 44
book mark this site  
« on: Mar 28th, 2007, 9:50am »
Quote Quote Modify Modify

Is there html code for adding a link (or button) to my personal website so visitors can click it and it automatically creates a book mark for my site?  
 
I viewed the source code for the homepage for this site, and tried to mimic it, but it didn't work for me, and I figure I'm missing something.
 
Any help is much appreciated.
Thanks.
IP Logged
towr
wu::riddles Moderator
Uberpuzzler
*****



Some people are average, some are just mean.

   


Gender: male
Posts: 13730
Re: book mark this site  
« Reply #1 on: Mar 28th, 2007, 10:27am »
Quote Quote Modify Modify

I think the only way to do it is with javascript. I'll have a look if I can find it..
IP Logged

Wikipedia, Google, Mathworld, Integer sequence DB
towr
wu::riddles Moderator
Uberpuzzler
*****



Some people are average, some are just mean.

   


Gender: male
Posts: 13730
Re: book mark this site  
« Reply #2 on: Mar 28th, 2007, 10:32am »
Quote Quote Modify Modify

Put the following in the header of your page (or anywhere, really, but it's neater to put it in the header)
 
<script>
function bookMark() {
if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)){
window.external.AddFavorite (window.location,document.title);
}
else {
var msg = "Don't forget to bookmark us!";
if(navigator.appName == "Netscape") msg += " (CTRL-D)";
alert(msg);
}
}</script>
 
 
 
then make a link
<a href="javascript:bookMark();">bookmark this page</a>
 
It only works with IE, I think.. Thats' the problem with javascript, it varies per browser.
« Last Edit: Mar 28th, 2007, 10:33am by towr » IP Logged

Wikipedia, Google, Mathworld, Integer sequence DB
mfirmata
Newbie
*



Don't read this

   


Gender: male
Posts: 44
Re: book mark this site  
« Reply #3 on: Mar 28th, 2007, 6:37pm »
Quote Quote Modify Modify

Thanks. I'll try it out.
 
 
It works, on my laptop I use IE7 though.  
 
Is this what the code is doing:
- If they use IE4 or greater, it opens the favorites windows and gives them the option to add my site, or else it reminds them to bookmark the site manually.
- If they are using Netscape it opens the bookmark window, giving them the ablity to add my site.
 
 
What if they are using another browser like FoxFire or something. (Is foxfire even an internet browser?)
 
Thanks for your help towr.  I really appreciate it.  
« Last Edit: Mar 28th, 2007, 6:51pm by mfirmata » IP Logged
towr
wu::riddles Moderator
Uberpuzzler
*****



Some people are average, some are just mean.

   


Gender: male
Posts: 13730
Re: book mark this site  
« Reply #4 on: Mar 29th, 2007, 12:00am »
Quote Quote Modify Modify

It opens the add-favorite dialog for IE4+. Otherwise it tells the user to do it manually, adding the suggestion CTRL-D for netscape-like browsers. (It does the latter for firefox too; it least on my computer)
 
I'm not sure what it does for opera or konqueror or other browsers. Possibly nothing.
« Last Edit: Mar 29th, 2007, 12:02am by towr » IP Logged

Wikipedia, Google, Mathworld, Integer sequence DB
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print

« Previous topic | Next topic »

Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board