Machiavelli Posted October 4, 2006 Share Posted October 4, 2006 Sorry if i put this in the wrong place... not sure where it would go... but I would like to put a bookmarking link on my page so visitors can bookmark the homepage or whatever page it may be.. is there some simple coding for this? ... thanks in advance... Link to comment Share on other sites More sharing options...
murfitUK Posted October 4, 2006 Share Posted October 4, 2006 Have a look at this page.http://www.hypergurl.com/bookmark.html Link to comment Share on other sites More sharing options...
holmedwa04 Posted October 5, 2006 Share Posted October 5, 2006 I just use this code, which is really simple to insert:<INPUT TYPE="button" VALUE="Add to Favorites" onClick="addToFavorites()">All you need to do is set the bit in bold to what you want the button to say. Link to comment Share on other sites More sharing options...
Machiavelli Posted October 9, 2006 Author Share Posted October 9, 2006 I just use this code, which is really simple to insert:<INPUT TYPE="button" VALUE="Add to Favorites" onClick="addToFavorites()">All you need to do is set the bit in bold to what you want the button to say.I'll try the simple one first... should it be put in between the HEAD tags or BODY tags? ... Link to comment Share on other sites More sharing options...
holmedwa04 Posted October 10, 2006 Share Posted October 10, 2006 Anywhere, where ever you want the link, just bung it in...<INPUT TYPE="button" VALUE="Add to Favorites" onClick="addToFavorites()">You can change it to text I think but I am not sure how you do that. Link to comment Share on other sites More sharing options...
reportingsjr Posted October 10, 2006 Share Posted October 10, 2006 whats the function for addToFavorites()? You dont specify that so it has no use. Link to comment Share on other sites More sharing options...
Machiavelli Posted October 10, 2006 Author Share Posted October 10, 2006 oh oh i sense conflict whether this simple command works or not... Link to comment Share on other sites More sharing options...
holmedwa04 Posted October 10, 2006 Share Posted October 10, 2006 whats the function for addToFavorites()? You dont specify that so it has no use.I don't understand it myself personally, I just got it of a website, and it works, so I used it, and when Marchivelli asked about bookmarking I said that this worked. Please can you explain what is wrong with this, and posibly change it? Link to comment Share on other sites More sharing options...
Machiavelli Posted October 10, 2006 Author Share Posted October 10, 2006 Yeah I would like to know also before I try it myself... also I would like it to be in text.... Link to comment Share on other sites More sharing options...
Ruud Hermans Posted October 11, 2006 Share Posted October 11, 2006 This only works for IE as far as I'm aware of. <a href="java script:window.external.AddFavorite('http://www.yourwebsite.nl','My Website!')">Click here to bookmark this page</a> The browser needs to support Javascript.Ruud Hermans Link to comment Share on other sites More sharing options...
Machiavelli Posted October 11, 2006 Author Share Posted October 11, 2006 ackkk thought this would be a easy topic... now I'm more confused... Link to comment Share on other sites More sharing options...
justsomeguy Posted October 11, 2006 Share Posted October 11, 2006 Look at the first link that was posted, from murfituk. Link to comment Share on other sites More sharing options...
Machiavelli Posted October 11, 2006 Author Share Posted October 11, 2006 Any shorter coding/script? .. Link to comment Share on other sites More sharing options...
justsomeguy Posted October 11, 2006 Share Posted October 11, 2006 Are you kidding? <script language="JavaScript" type="Text/Javascript"><!-- // Hide script from older browsers // script by http://www.hypergurl.com var urlAddress = "http://www.hypergurl.com/graphics.html"; var pageName = "Free Graphics,Hypergurl"; function addToFavorites() { if (window.external) { window.external.AddFavorite(urlAddress,pageName) } else { alert("Sorry! Your browser doesn't support this function."); } } // --></script><a href="java script:addToFavorites()">Bookmark Page!</a> That's about as simple as it gets, and includes error checking. Make sure to remove the space in "javascript" on the link. Link to comment Share on other sites More sharing options...
Machiavelli Posted October 14, 2006 Author Share Posted October 14, 2006 I should type it out exactly as is or I need to make some changes as well and also where is it placed. Between Head tags or Body tags? etc. Link to comment Share on other sites More sharing options...
holmedwa04 Posted October 15, 2006 Share Posted October 15, 2006 I should type it out exactly as is or I need to make some changes as well and also where is it placed. Between Head tags or Body tags? etc.I would copy it exactly by selecting it, then copying and then just change the bits that you need to change as and when you need to, then usually, if the code the person gave you is correct it should all work! Link to comment Share on other sites More sharing options...
Machiavelli Posted October 16, 2006 Author Share Posted October 16, 2006 so then take out her URL's and put my URL's in place and put the whole script in the <Body> tags? ... Just want to make sure I get it right... Link to comment Share on other sites More sharing options...
holmedwa04 Posted October 16, 2006 Share Posted October 16, 2006 Yeh, I am not sure where it should go, I don't think it really matters where you put it, you could try putting it in between the head tags? Link to comment Share on other sites More sharing options...
Machiavelli Posted October 16, 2006 Author Share Posted October 16, 2006 Are you kidding? <script language="JavaScript" type="Text/Javascript"><!-- // Hide script from older browsers // script by http://www.hypergurl.com var urlAddress = "http://www.hypergurl.com/graphics.html"; var pageName = "Free Graphics,Hypergurl"; function addToFavorites() { if (window.external) { window.external.AddFavorite(urlAddress,pageName) } else { alert("Sorry! Your browser doesn't support this function."); } } // --></script><a href="java script:addToFavorites()">Bookmark Page!</a> That's about as simple as it gets, and includes error checking. Make sure to remove the space in "javascript" on the link. Ok..so i tried the script hypergurl suggested and it's not working... IE says: Page cannot be displayed. so something is wrong with the script or it doesn't work in IE. Only works for other browsers. Doesn't seem to work in Netscape neither. Any ideas? Perhaps there is a error in the script somewhere. Link to comment Share on other sites More sharing options...
holmedwa04 Posted October 16, 2006 Share Posted October 16, 2006 I would just use the code that I sent to you, it works in IE fines, but not in FF, but does that matter? I don't understand the code that the other person sent, you could just have a look at someone elses source code and then try it in your site? Link to comment Share on other sites More sharing options...
justsomeguy Posted October 16, 2006 Share Posted October 16, 2006 Ok..so i tried the script hypergurl suggested and it's not working... IE says: Page cannot be displayed. so something is wrong with the script or it doesn't work in IE. Only works for other browsers. Doesn't seem to work in Netscape neither. Any ideas? Perhaps there is a error in the script somewhere.Use this link instead with the code I posted earlier.<a href="java script: void(0);" onclick="addToFavorites()">Bookmark Page!</a>The other Javascript code goes in the head of the document. And, like I said before, make sure to remove the space between "java" and "script" in the link, because this forum adds a space there where there should not be one. Link to comment Share on other sites More sharing options...
Machiavelli Posted October 17, 2006 Author Share Posted October 17, 2006 this is another script someone else gave me but doesnt work also... In <head>:<script type="text/javascript">/************************************************ Bookmark site script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)* This notice MUST stay intact for legal use* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code***********************************************/function bookmarksite(title, url){if (document.all)window.external.AddFavorite(url, title);else if (window.sidebar)window.sidebar.addPanel(title, url, "")}</script>In Body: <a href="java script:bookmarksite('Your Site', 'http://www.yoursite.com')">Bookmark</a> Link to comment Share on other sites More sharing options...
holmedwa04 Posted October 17, 2006 Share Posted October 17, 2006 But that code doesn't work in other borwsers either, I think I prefer the code that I am using Link to comment Share on other sites More sharing options...
Machiavelli Posted October 17, 2006 Author Share Posted October 17, 2006 It's just weird that it works for other people and some people it don't... I can't be doing anything wrong because I cut and paste it into the HTML document in the HEAD and BODY tags... Link to comment Share on other sites More sharing options...
justsomeguy Posted October 17, 2006 Share Posted October 17, 2006 this is another script someone else gave me but doesnt work also...It works fine for me in Firefox and IEhttp://manchine.net/w3/bookmarktest.htmlMachiavelli, I know you're not scared to be contacted via PM, are you? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now