Forum Moderators: mack
<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>
and i was reading brett's successful site in 12 months and there is this point where he says it would be better not to use java script because SE spiders don't like it.
my question: how really bad is the above bookmark-java script for spiders?
[edited by: HuhuFruFru at 6:08 pm (utc) on Feb. 27, 2003]
You'll need the type attribute to keep the W3C HTML validator [validator.w3.org] happy, and the language attribute for really old browsers.
You get a similar advantage for CSS by using external files for that, too.