2
Contributors
4
Replies
5
Views
11 Years
Discussion Span
Last Post by tgreer
0

Hyperlink an image.

<a href="http://www.jscode.com/js_auto_bookmark.shtml" alt="bookmark"><img src="myImage.gif" alt="bookmark" /></a>

thanks for trying, but my question was about the "bookmark us!" link inside the script:

<!--
// ==============================================
// Copyright 2003 by jsCode.com
// Source: jsCode.com
// Author: etLux
// Free for all; but please leave in the header.
// ==============================================
// message to show in non-IE browsers
[B]var txt = "Bookmark Us!"[/B]
// do not edit below this line
// ===========================
var url = this.location;
var who = document.title;
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>

now, how can i make an image link to activate this script?

0

found it!!!
needed to replace var text like this:

var txt = "<img src='some.gif' width='100' height='30' border='0'>"

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.