Appears to be a classic case of string vs. variable. When you go:
Code:
<a href="javascript:bookmarksite('Home Page', 'http://www.domain.com/index.html')">
You are passing two string literals to the function but, when you go:
Code:
<a href="javascript:bookmarksite('document.title', 'self.location.href')">
You are trying to pass two variables. By quoting them, you turn them back into string literals (ones that make no sense to the function, or more precisely, the browsers the function is targeting). The proper method (assuming these variables have the expected values) would be:
Code:
<a href="javascript:bookmarksite(document.title, self.location.href)">
without quotes. That way, they will be treated as variables and (if properly defined before this link is clicked) resolved to their assigned values by the function.
Bookmarks