Centers a string in the specified field length by adding padding on either side of the string.
See also LJustify and RJustify.
Cjustify(string, length)
Any string to be centered.
Length of field.
<!--- This example shows how to use CJustify ---> <CFIF NOT IsDefined("jstring")> <CFSET jstring=""> </CFIF> <CFIF IsDefined("FORM.justifyString")> <CFSET jstring=Cjustify("#FORM.justifyString#", 35)> </CFIF> <HTML> <HEAD> <TITLE> CJustify Example </TITLE> </HEAD> <BODY bgcolor=silver> <H3>CJustify</H3> <P>Enter a string, and it will be center justified within the sample field <FORM ACTION="cjustify.cfm" METHOD="POST"> <P><INPUT TYPE="Text" VALUE="<CFOUTPUT>#jString#</CFOUTPUT>" SIZE=35 NAME="justifyString"> <P><INPUT TYPE="Submit" NAME=""> <INPUT TYPE="RESET"> </FORM> </BODY> </HTML>