CFLib.org – Common Function Library Project

HideLink(href, display, caption)

Last updated September 20, 2002

author

Jeff Guillaume

Version: 1 | Requires: CF5 | Library: StrLib

Description:
Creates a disguised link by using JavaScript's window.status attribute to display a desired string in the browser's status bar instead of the actual location of the link. Uses XMLFormat to be XHTML-compliant.

Return Values:
Returns a string.

Example:

<cfoutput>
#HideLink("http://www.kazoomis.com/", "Click here to visit Kazoomis.com", "Kazoomis.com")#
</cfoutput>

Parameters:

Name Description Required
href URL for the link. Yes
display Text to disply in window.status. Yes
caption Text for the link. Yes

Full UDF Source:

/**
 * Disguise a link using JavaScript's window.status attribute.
 * 
 * @param href 	 URL for the link. (Required)
 * @param display 	 Text to disply in window.status. (Required)
 * @param caption 	 Text for the link. (Required)
 * @return Returns a string. 
 * @author Jeff Guillaume (jeff@kazoomis.com) 
 * @version 1, September 20, 2002 
 */
function HideLink(href, display, caption) {

	var str = "";
	
	str = "<a href=""#XMLFormat(href)#"" onmouseover=""window.status='#XMLFormat(display)#'; return true;"" onmouseout=""window.status=''; return true;""";
	str = str & ">";
	str = str & "#caption#</a>";
	
	return str;
	
}
blog comments powered by Disqus

Search CFLib.org


Latest Additions

Kevin Cotton added
date2ExcelDate
May 5, 2016

Raymond Camden added
CapFirst
April 25, 2016

Chris Wigginton added
loremIpsum
January 18, 2016

Gary Stanton added
calculateArrival...
November 19, 2015

Sebastiaan Naafs - van Dijk added
getDaysInQuarter
November 13, 2015

Created by Raymond Camden / Design by Justin Johnson