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;
    
}

Search CFLib.org


Latest Additions

Raymond Camden added
QueryDeleteRows
November 04, 2017

Leigh added
nullPad
May 11, 2016

Raymond Camden added
stripHTML
May 10, 2016

Kevin Cotton added
date2ExcelDate
May 05, 2016

Raymond Camden added
CapFirst
April 25, 2016

Created by Raymond Camden / Design by Justin Johnson