292
CJustify
Centers a string in the specified field length.
See also
Syntax
Cjustify( string , length )
string
Any string to be centered.
length
Length of field.
Examples
<!--- This example shows how to use CJustify --->
<CFPARAM NAME="jstring" DEFAULT="">
<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>
LJustify
and RJustify.
CFML Language Reference
Need help?
Do you have a question about the COLDFUSION 4.5-CFML LANGUAGE and is the answer not in the manual?
Questions and answers