Hello, I have a
JS Code that I have gotten from Dynamic Drive and Instead of putting it in my main page I put it in a .
js file and linked it from the Page. Anyhow It's not working correctly. So, if anyhelp can be done I will very well appreciate it! Here's the code..
This is the .
js file:
- Code: Select all
/***********************************************
* 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);
}
This is in my <head> tag:
- Code: Select all
<script type="text/javascript" src="includes/addtofav.js"></script>
And this bit is in the <body> section:
- Code: Select all
<p style="position:absolute;right:12%;top:18%;">
<a href="javascript:bookmarksite('New Breed Jesus Freaks', 'http://www.newbreedjesusfreaks.com')">Bookmark this site!</a>
</p>
Thanks!