CFLib.org – Common Function Library Project

getCurrentPage()

Last updated August 27, 2006

author

Jack Poe

Version: 1 | Requires: CF5 | Library: UtilityLib

Description:
Returns the filename of the current URL.

Return Values:
Returns a string.

Example:

The current page is: #getCurrentPage()#

Parameters:

No arguments.

Full UDF Source:

/**
 * Returns the filename of the current URL.
 * 
 * @return Returns a string. 
 * @author Jack Poe (jpoe@afit.edu) 
 * @version 1, August 26, 2006 
 */
function getCurrentPage() {
    var thisPage = spanExcluding(reverse(CGI.SCRIPT_NAME),'/');
    thisPage = reverse(thispage);
    return thisPage;
}

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