jesusarmy
12-11-2008, 12:58 PM
Script Title: Bookmark Site
URL: http://www.dynamicdrive.com/dynamicindex9/addbook.htm
The current release of Opera will not add a bookmark from this script. I understand that this issue applies to Opera 7+ which blocks programmed clicks.
The workaround is to write the links in Javascript, and write one for Opera with embedded links to create the bookmark:
<script type="text/javascript">
var sidebarurl = "http://www.jesus.org.uk/sidebar.htm"; // Change as required
var sidebartitle = "Jesus Army pages"; // Change as required
var url = this.location;
var title = document.title;
function bookmarksite() {
if (window.sidebar && window.sidebar.addPanel){ // Firefox
window.sidebar.addPanel(sidebartitle, sidebarurl,"");
}
else if ( document.all ) { // IE Favorite
window.external.AddFavorite(url, title);
}
else if (window.opera && window.print) {
// do nothing
}
else if (navigator.appName=="Netscape") {
alert("Please click OK, then press <Ctrl-D> to bookmark this page.");
}
}
if (window.sidebar && window.sidebar.addPanel) {
document.write('<a href = "javascript:bookmarksite();">Bookmark Site</a>');
}
else if (document.all) {
document.write('<a href = "javascript:bookmarksite();">Add to Favourites</a>');
}
else if (window.opera && window.print) {
document.write('<a href = "'+sidebarurl+'" title="'+sidebartitle+'" rel="sidebar">Bookmark Site</a>');
}
else if (navigator.appName=="Netscape") {
document.write('<a href = "javascript:bookmarksite();">Bookmark this page</a>');
}
</script>
This script can just be put in the body of the page where the bookmark link is required.
Opera and Firefox put a bookmark in the sidepanel. For this the best idea is a specific mini page that gives a selection of links for your site, and which has a line <base target=_content> in the head section of the page so that clicks on the mini page will open in the main page of the browser
URL: http://www.dynamicdrive.com/dynamicindex9/addbook.htm
The current release of Opera will not add a bookmark from this script. I understand that this issue applies to Opera 7+ which blocks programmed clicks.
The workaround is to write the links in Javascript, and write one for Opera with embedded links to create the bookmark:
<script type="text/javascript">
var sidebarurl = "http://www.jesus.org.uk/sidebar.htm"; // Change as required
var sidebartitle = "Jesus Army pages"; // Change as required
var url = this.location;
var title = document.title;
function bookmarksite() {
if (window.sidebar && window.sidebar.addPanel){ // Firefox
window.sidebar.addPanel(sidebartitle, sidebarurl,"");
}
else if ( document.all ) { // IE Favorite
window.external.AddFavorite(url, title);
}
else if (window.opera && window.print) {
// do nothing
}
else if (navigator.appName=="Netscape") {
alert("Please click OK, then press <Ctrl-D> to bookmark this page.");
}
}
if (window.sidebar && window.sidebar.addPanel) {
document.write('<a href = "javascript:bookmarksite();">Bookmark Site</a>');
}
else if (document.all) {
document.write('<a href = "javascript:bookmarksite();">Add to Favourites</a>');
}
else if (window.opera && window.print) {
document.write('<a href = "'+sidebarurl+'" title="'+sidebartitle+'" rel="sidebar">Bookmark Site</a>');
}
else if (navigator.appName=="Netscape") {
document.write('<a href = "javascript:bookmarksite();">Bookmark this page</a>');
}
</script>
This script can just be put in the body of the page where the bookmark link is required.
Opera and Firefox put a bookmark in the sidepanel. For this the best idea is a specific mini page that gives a selection of links for your site, and which has a line <base target=_content> in the head section of the page so that clicks on the mini page will open in the main page of the browser