Forum Moderators: open
<script language='javascript'>
document.write("<a href='http://del.icio.us/post?url=" + document.location.href + "&title=" + document.title + "'>Add to Del.icio.us</a>")
</script>
document.location.href = url/location of the page
document.title = title of page from <title> element
don't understand it all myself but it works ;)
Suzy
I set in a library, it is easier to have all the js in only one location and call them when needed via a library.
Name it bookmark_my_site.js <SCRIPT LANGUAGE="JavaScript">
var txt = "Bookmark this site";
var url = "http://www.mydomain.com";
var who = "My Domain";
var ver = navigator.appName;
var num = parseInt(navigator.appVersion);
if ((ver == "Microsoft Internet Explorer")&&(num >= 4)) {
document.write('<A HREF="javascript:window.external.AddFavorite(url,who);" ');
document.write('onMouseOver=" window.status=');
document.write("txt; return true ");
document.write('"onMouseOut=" window.status=');
document.write("' '; return true ");
document.write('">'+ txt + '</a>');
}else{
txt += " (Ctrl+D)";
document.write(txt);
}
</script>
PUT IT IN A LIBRARY AND CALL IT:
<script type="text/javascript" language="javascript" src="/library/bookmark_my_site.js"></script>
The 'Add to del.icio.us' link makes perfect sense as in that case there's no built-in command.