oceans Posted December 1, 2008 Share Posted December 1, 2008 Dear People, Please help me to put an Icon in the Favorites Box along with my link in a browser. I managed to put an Icon in the address bar. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/134933-solved-put-an-icon-in-the-favorites-box-along-with-my-link-in-a-browser/ Share on other sites More sharing options...
plasmagames Posted December 1, 2008 Share Posted December 1, 2008 well if it comes up when you go to the page then when you book mark it it should come up there to. Quote Link to comment https://forums.phpfreaks.com/topic/134933-solved-put-an-icon-in-the-favorites-box-along-with-my-link-in-a-browser/#findComment-702776 Share on other sites More sharing options...
oceans Posted December 1, 2008 Author Share Posted December 1, 2008 I am using the following to get my viewers to book mark my page. " <td><input name="button" type="button" onclick="bookmark('http://www.blablabla.com/','blablabla.com')" value="Bookmark Us!" /></td> " Can we modify so that the icon will be in my viewers browers. Presently My Favicon does not appear at the bookmark. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/134933-solved-put-an-icon-in-the-favorites-box-along-with-my-link-in-a-browser/#findComment-702857 Share on other sites More sharing options...
haku Posted December 2, 2008 Share Posted December 2, 2008 It's not consistent across browsers. What browser are you looking at? Quote Link to comment https://forums.phpfreaks.com/topic/134933-solved-put-an-icon-in-the-favorites-box-along-with-my-link-in-a-browser/#findComment-703568 Share on other sites More sharing options...
CroNiX Posted December 2, 2008 Share Posted December 2, 2008 as haku stated, this is a browser feature, and not all browsers handle it the same way. There is nothing that can be done to make it work in all browsers. All you can do is define one. Quote Link to comment https://forums.phpfreaks.com/topic/134933-solved-put-an-icon-in-the-favorites-box-along-with-my-link-in-a-browser/#findComment-703580 Share on other sites More sharing options...
oceans Posted December 2, 2008 Author Share Posted December 2, 2008 I get it lets say IE and mozilla, can we have two scripts for each. But I understand there is a lot of browesers out there. Quote Link to comment https://forums.phpfreaks.com/topic/134933-solved-put-an-icon-in-the-favorites-box-along-with-my-link-in-a-browser/#findComment-703629 Share on other sites More sharing options...
CroNiX Posted December 2, 2008 Share Posted December 2, 2008 No, the functionality is totally handled by the browser...You cant change anything about how its handled. The only thing you can do is: <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /> and thats all. Quote Link to comment https://forums.phpfreaks.com/topic/134933-solved-put-an-icon-in-the-favorites-box-along-with-my-link-in-a-browser/#findComment-703659 Share on other sites More sharing options...
oceans Posted December 3, 2008 Author Share Posted December 3, 2008 I will try, but please help me where to place it, as for bookmarking, I use the following in the body section. Thanks. <tr> <td><input name="button" type="button" onclick="bookmark('http://www.blablabla.com/','blablabla.com ( blablabla )')" value="Bookmark Us!" /></td> </tr> Quote Link to comment https://forums.phpfreaks.com/topic/134933-solved-put-an-icon-in-the-favorites-box-along-with-my-link-in-a-browser/#findComment-704537 Share on other sites More sharing options...
haku Posted December 3, 2008 Share Posted December 3, 2008 Put the code that cronix posted in the head of your page. There is no way to guarantee it will be added into the bookmarks. Some browsers will add it, some wont. Most new ones will. Quote Link to comment https://forums.phpfreaks.com/topic/134933-solved-put-an-icon-in-the-favorites-box-along-with-my-link-in-a-browser/#findComment-704541 Share on other sites More sharing options...
oceans Posted December 4, 2008 Author Share Posted December 4, 2008 I tried it is not working. I am using IE though. Quote Link to comment https://forums.phpfreaks.com/topic/134933-solved-put-an-icon-in-the-favorites-box-along-with-my-link-in-a-browser/#findComment-705591 Share on other sites More sharing options...
CroNiX Posted December 4, 2008 Share Posted December 4, 2008 Did you put it in the head of your document? Look for: </head> replace with: <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /> </head> For this to work you must have your icon (in this case its called favicon.ico) in your ROOT directory of your site or adjust the path accordingly (/favicon.ico). If this is done and its not working, there is a possibility that the icon itself is wrong. Google 'favicon.ico' and you will find a ton of info on how to properly create them and set them up. Quote Link to comment https://forums.phpfreaks.com/topic/134933-solved-put-an-icon-in-the-favorites-box-along-with-my-link-in-a-browser/#findComment-705602 Share on other sites More sharing options...
haku Posted December 4, 2008 Share Posted December 4, 2008 IE is spotty as hell when it comes to favicon implementation. IE6 is particularly bad, but IE7 is a pain in the butt too. I read a blog one time by the guy who was responsible for favicon implementation either IE6 or IE7 (he wasn't working for microsoft anymore at the time of writing), and he was talking about how he felt bad that it had ended up so screwed up! Quote Link to comment https://forums.phpfreaks.com/topic/134933-solved-put-an-icon-in-the-favorites-box-along-with-my-link-in-a-browser/#findComment-705615 Share on other sites More sharing options...
oceans Posted December 7, 2008 Author Share Posted December 7, 2008 I still can't get it done, I have seen monster, yahoo, google, paypal, so many doing it. Can you pleae help, i want to do it as it looks nice, i want to have it too. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/134933-solved-put-an-icon-in-the-favorites-box-along-with-my-link-in-a-browser/#findComment-708553 Share on other sites More sharing options...
plasmagames Posted December 7, 2008 Share Posted December 7, 2008 where is the .ico file placed? Quote Link to comment https://forums.phpfreaks.com/topic/134933-solved-put-an-icon-in-the-favorites-box-along-with-my-link-in-a-browser/#findComment-708612 Share on other sites More sharing options...
dropfaith Posted December 7, 2008 Share Posted December 7, 2008 taken direct from monster.com <link rel="shortcut icon" href="http://images.monster.com/favicon.ico"> Quote Link to comment https://forums.phpfreaks.com/topic/134933-solved-put-an-icon-in-the-favorites-box-along-with-my-link-in-a-browser/#findComment-708787 Share on other sites More sharing options...
oceans Posted December 9, 2008 Author Share Posted December 9, 2008 Thanks I am using javascript to do the book marking function bookmark(url,title){ if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) { window.external.AddFavorite(url,title); } else if (navigator.appName == "Netscape") { window.sidebar.addPanel(title,url,""); } else { alert("Press CTRL-D (Netscape) or CTRL-T (Opera) to bookmark"); } } where & how can I place your suggestion? Quote Link to comment https://forums.phpfreaks.com/topic/134933-solved-put-an-icon-in-the-favorites-box-along-with-my-link-in-a-browser/#findComment-710122 Share on other sites More sharing options...
haku Posted December 9, 2008 Share Posted December 9, 2008 In the head of your document. Quote Link to comment https://forums.phpfreaks.com/topic/134933-solved-put-an-icon-in-the-favorites-box-along-with-my-link-in-a-browser/#findComment-710180 Share on other sites More sharing options...
oceans Posted December 9, 2008 Author Share Posted December 9, 2008 Dear Haku, Thanks but did you tried yourself, the reason is <link rel="shortcut icon" href="http://images.monster.com/favicon.ico"> window.external.AddFavorite(url,title); does not make use of your suggestion thus it will not reside in one's computer. please advise Quote Link to comment https://forums.phpfreaks.com/topic/134933-solved-put-an-icon-in-the-favorites-box-along-with-my-link-in-a-browser/#findComment-710310 Share on other sites More sharing options...
CroNiX Posted December 9, 2008 Share Posted December 9, 2008 Oceans - At this point I think it would be much better if you would post your whole code so we can look at it. Quote Link to comment https://forums.phpfreaks.com/topic/134933-solved-put-an-icon-in-the-favorites-box-along-with-my-link-in-a-browser/#findComment-710313 Share on other sites More sharing options...
oceans Posted December 9, 2008 Author Share Posted December 9, 2008 The following forms the book markling page, the java script for book marking is above. I already getting the favicon on the address bar, what I want is the icon to appear on the favorites list. <?php ob_start(); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <link rel="shortcut icon" href="../CSS/favicon.ico" /> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link href="../CSS/StyleSheet.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="../CSS/BookMark.js"></script> </head> <body> <table width="100%" border="0" cellpadding="0" cellspacing="0" class="Background01"> <tr> <td><table width="765" border="0" align="center" cellpadding="5" cellspacing="0"> <tr> <td><table width="755" border="0" cellpadding="5" cellspacing="0"> <tr> <td width="745" class="MainPageHeader1">Bookmark Us!</td> </tr> <tr> <td> </td> </tr> <tr> <td><table width="745" border="0" cellpadding="5" cellspacing="0"> <tr class="FieldValue"> <td width="167"> </td> <td width="558"><table width="167" border="0" cellpadding="5" cellspacing="0"> <tr> <td width="157"> </td> </tr> <tr> <td> </td> </tr> <tr> <td> </td> </tr> <tr> <td><input name="button" type="button" onclick="bookmark('http://www.blablabla.com/','www.blablabla.com')" value="Bookmark Us!" /></td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td class="MainPageFooter1"> </td> </tr> </table></td> </tr> </table></td> </tr> </table> </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/134933-solved-put-an-icon-in-the-favorites-box-along-with-my-link-in-a-browser/#findComment-710315 Share on other sites More sharing options...
dropfaith Posted December 9, 2008 Share Posted December 9, 2008 http://www.chami.com/tips/Internet/110599I.html read up here all the advice we have given you is correct this has nothing to do with javascript at all its just an ico file which needs to be placed in the head of the document Quote Link to comment https://forums.phpfreaks.com/topic/134933-solved-put-an-icon-in-the-favorites-box-along-with-my-link-in-a-browser/#findComment-710325 Share on other sites More sharing options...
oceans Posted December 9, 2008 Author Share Posted December 9, 2008 May I ask is "CTRL-D" common for all browsers for asking for book marking? The reason is, when I ask IE to book mark I see my icon, but if I ask my script, does away with the icon. If CTRL-D is common for all browser, I will simply prompt user to type CTRL-D, why must I sweat so much. It is a small thing any way. Quote Link to comment https://forums.phpfreaks.com/topic/134933-solved-put-an-icon-in-the-favorites-box-along-with-my-link-in-a-browser/#findComment-710330 Share on other sites More sharing options...
dropfaith Posted December 9, 2008 Share Posted December 9, 2008 i know control d is firefox but i think opera was control t i could be wrong tho Quote Link to comment https://forums.phpfreaks.com/topic/134933-solved-put-an-icon-in-the-favorites-box-along-with-my-link-in-a-browser/#findComment-710331 Share on other sites More sharing options...
CroNiX Posted December 9, 2008 Share Posted December 9, 2008 May I ask is "CTRL-D" common for all browsers for asking for book marking? The reason is, when I ask IE to book mark I see my icon, but if I ask my script, does away with the icon. If CTRL-D is common for all browser, I will simply prompt user to type CTRL-D, why must I sweat so much. It is a small thing any way. Its different for different browsers. As you are seeing there is no way to accomplish what you are trying to do in all browsers, and even then different versions of the same browser handle it differently. Its not a standard, so there is no standard way to handle it. I am wondering why you are putting so much time into something that doesn't really need to be done anyway. If people know how to use a browser, the vast majority of them know how to bookmark. If they like your site, they will bookmark it without you prompting them. Quote Link to comment https://forums.phpfreaks.com/topic/134933-solved-put-an-icon-in-the-favorites-box-along-with-my-link-in-a-browser/#findComment-710335 Share on other sites More sharing options...
haku Posted December 9, 2008 Share Posted December 9, 2008 There is no way to use javascript to have your favicon appear in their favorites list. It's a browser setting. The best you can do is use the < link> code that was given to you earlier. It will insert the favicon in the bookmarks list on modern browsers, but will be spotty with older browsers. There is no way around that. Quote Link to comment https://forums.phpfreaks.com/topic/134933-solved-put-an-icon-in-the-favorites-box-along-with-my-link-in-a-browser/#findComment-710360 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.