deleteDoctype()
Last updated July 11, 2005
Version: 1 | Requires: ColdFusion MX | Library: UtilityLib
Description:
If you're having display issues on a page, call this function to remove the doctype from your request. This solves the display problems with using cfdump in CFMX under an XHTML doctype. You can modify this code to, for example, change a strict doctype to a transitional one.
Return Values:
Returns nothing.
Example:
Parameters:
No arguments.
Full UDF Source:
<cfscript>
/**
* Deletes the doctype out of the current page request.
*
* @return Returns nothing.
* @author Nathan Strutz (mrnate@hotmail.com)
* @version 1, July 11, 2005
*/
function deleteDoctype() {
var str = getPageContext().getOut().getString();
str = reReplace(str,"<!DOCTYPE[^>]*>","","ONE");
getPageContext().popBody().clearBuffer();
writeOutput(str);
}
</cfscript>
Search CFLib.org
Latest Additions
Dave Anderson added
iniToStruct
20 day(s) ago
Dave Anderson added
deDupeArray
20 day(s) ago
Richard added
dice
22 day(s) ago
Isaac Dealey added
getRelative
a while ago
Top Rated
backupDatabase
Rated 5.0, 22 time(s)
indentXml
Rated 5.0, 10 time(s)
generateSsccAsn
Rated 5.0, 4 time(s)
highlightAndCrop
Rated 5.0, 4 time(s)