brian northmore
11-22-2007, 07:38 PM
1) Script Title:
bookmarksite
2) Script URL (on DD):
"javascript:bookmarksite"
3) Describe problem:
I am enclosing the script I copied to see if you can help. When I try to run it I get an error on page as described:
<html>
<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
***********************************************/
/* Modified to support Opera (v9 tested) */
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>
</head>
<body>
<a href="javascript:bookmarksite('Yahoo', 'http://www.yahoo.com');">Bookmark Yahoo</a>
</body>
</html>
<!--
*******************************************
I set up a simple html file to test the bookmark before using it on my site, but I am getting the following error:
Line: 24
Char: 2
Error: Object doesn't support this propertty or method
Code: 0
URL file: //etc
I am using windows Vista basic edition
**********************************************
-->
bookmarksite
2) Script URL (on DD):
"javascript:bookmarksite"
3) Describe problem:
I am enclosing the script I copied to see if you can help. When I try to run it I get an error on page as described:
<html>
<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
***********************************************/
/* Modified to support Opera (v9 tested) */
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>
</head>
<body>
<a href="javascript:bookmarksite('Yahoo', 'http://www.yahoo.com');">Bookmark Yahoo</a>
</body>
</html>
<!--
*******************************************
I set up a simple html file to test the bookmark before using it on my site, but I am getting the following error:
Line: 24
Char: 2
Error: Object doesn't support this propertty or method
Code: 0
URL file: //etc
I am using windows Vista basic edition
**********************************************
-->