[Javascript] Adding scriptlet to favourites menu via javascript (IE 6+)
JS Student
tuofamerikazmostwanted at gmail.com
Tue May 27 06:09:28 CDT 2008
Hi,
I am sorry if this has been asked already.
I have a scriptlet on my website that I want to add to the user's
favorites menu (Internet Explorer 6+). I am using:
window.external.AddFavorite(url,title);
This works fine when the url is "http:" protocol based but it wont let
me add a "javascript:" url. The error I get is permission denied.
This is my code:
/*BEGIN CODE*/
// JavaScript OnClick handler:
function addScriptletToFavs() {
var url = "JavaScript:myfucn();void();";
var title = "My Scriptlet";
window.external.AddFavorite(url,title);
}
// HTML code for button:
<input type="button" value="Add to Favourites"
onclick="JavaScript:addScriptletToFavs();" />
/*END CODE*/
Can anybody please help me in this regard?
Thanks in advance.
Aaron.
More information about the Javascript
mailing list