Thanks for answering everybody's questions John.
I think you got the right idea with your your 2nd snippet of code, but for some reason I cant get it to work...
I'll just post my html file:
Code:
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<title>Untitled Page</title>
<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
***********************************************/
function bookmarksite(title, url){
if (document.all)
window.external.AddFavorite(url, title);
else if (window.sidebar)
window.sidebar.addPanel(title, url, "")
}
</script>
</head>
<body bgcolor="#ffffff">
<p><a href="javascript: bookmarksite(document.title, window.location.href)">bookmark this page</a></p>
</body>
</html>
Here's the error Opera gives (doesnt work in IE either):
Code:
Untitled Page
http://www..../untitled.html
Javascript URL thread: "javascript: bookmarksite(document.title, window.location.href)"
Error:
name: TypeError
message: Statement on line 9: Could not convert undefined or null to object
Backtrace:
Line 9 of inline#1 script in http://www...../untitled.html
window.external.AddFavorite(url, title);
Line 1 of unknown script
bookmarksite(document.title, window.location.href);
Any clue what the problem is?
Bookmarks