Centers a string in a field length.
Cjustify(string, length)
| Parameter |
Description |
|---|---|
| string |
A string to center |
| length |
Length of field |
<!--- 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>