I realy need this script:
http://www.jscode.com/js_auto_bookmark.shtml
unlike a regular bookmark, it grabs automaticly the page url & title to be added. one problem:

i just dont know how to make the link to the script as a picture, insted of "bookmark us!" text.
any help with this please?:eek:

Recommended Answers

All 4 Replies

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?

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

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

Yep, that's what I said: hyperlink an image :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.