Hi All
Is it possible to create a link that automatically adds the current web page to the user's browser bookmarks when clicked?
Thanks.
Hi All
Is it possible to create a link that automatically adds the current web page to the user's browser bookmarks when clicked?
Thanks.
Paste this code into a placeholder and position it where you want the link to appear.
Code:<SCRIPT LANGUAGE="JavaScript"><SCRIPT LANGUAGE="JavaScript"> <!-- Begin if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) { var url=document.URL; var title="YOUR WEBSITE TITLE HERE"; document.write('<A HREF="javascript:window.ext'); document.write('ernal.AddFavorite(url,title);" '); document.write('onMouseOver=" window.status='); document.write("'Bookmark this page!'; return true "); document.write('"onMouseOut=" window.status='); document.write("' '; return true "); document.write('">Bookmark this page!</a>'); } else { var msg = "Don't forget to bookmark us!"; if(navigator.appName == "Netscape") msg += " (CTRL-D)"; document.write(msg); } // End --> </SCRIPT>
Need more specific instruction please, James.
Gary W. Priester
Mr. Moderator Emeritus Dude, Sir
gwpriester.com | eyetricks-3d-stereograms.com | eyeTricks on Facebook | eyeTricks on YouTube | eyeTricks on Instagram
Sorry that was untested
This one does work in xara.
Copy the code below and right click on your page and select Paste HTML placeholder, this will add a small rectangle which will be replaced by the code when exported. This code needs to be placed in the Head section of your page so while the rectangle is selected using the yellow tag icon name it <head>
Then create a button or text link using the following as the url. You need to change the highlighted text to suit.Code:<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 ***********************************************/ /* Modified to support Opera */ 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>
javascript:bookmarksite('BOOKMARK TITLE HERE', 'http://www.yourdomain.com')
Here is an example
Many thanks, James and Gary; I'll give it a whirl.
Yup, thanks from me too. Just used it and it works a treat. Nice.
Bookmarks