Author |
Topic: book mark this site (Read 432 times) |
|
mfirmata
Newbie
Don't read this
Gender:
Posts: 44
|
|
book mark this site
« on: Mar 28th, 2007, 9:50am » |
Quote 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:
Posts: 13730
|
|
Re: book mark this site
« Reply #1 on: Mar 28th, 2007, 10:27am » |
Quote 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:
Posts: 13730
|
|
Re: book mark this site
« Reply #2 on: Mar 28th, 2007, 10:32am » |
Quote 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:
Posts: 44
|
|
Re: book mark this site
« Reply #3 on: Mar 28th, 2007, 6:37pm » |
Quote 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:
Posts: 13730
|
|
Re: book mark this site
« Reply #4 on: Mar 29th, 2007, 12:00am » |
Quote 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
|
|
|
|