I have some Javascript code for 'click to bookmark'. I know there is a bookmark sidebox mod which I have tried but I want to see if I can get this code formatted right as it works across all browsers with just a click.
I can get the code to work fine in tpl_header.php, but my client wants it on the right hand column of the page. I have been trying to place the Javascript within the blank_sidebox but it just makes everything else dissappear. Could anyone help me know how to incorporate this code in the side column?
The site is www.plantperfection.co.uk (login as skyegospel################## with password Test1 to view)
The code is as follows:
<script language="JavaScript1.2" type="text/javascript">
function CreateBookmarkLink() {
title="www.PlantPerfection.co.uk";
url="http://www.plantperfection.co.uk";
if (window.sidebar) { // Mozilla Firefox Bookmark
window.sidebar.addPanel(title, url,"");
} else if( window.external ) { // IE Favorite
window.external.AddFavorite( url, title); }
else if(window.opera && window.print) { // Opera Hotlist
return true; }
}
if (window.external) {
document.write('<a href="javascript:CreateBookmarkLink()");"> Bookmark this site</a>');
} else if (window.sidebar) {
document.write('<a href="javascript:CreateBookmarkLink()");"> Bookmark this site</a>');
} else if (window.opera && window.print) {
document.write('<a href="javascript:CreateBookmarkLink()");"> Bookmark this site</a>');
}
</script>
Many thanks in advance to anyone who can help with this,
Stuart



