<!---  This example shows the use of Right --->

<HTML>

<HEAD>
<TITLE>
Right Example
</TITLE>
</HEAD>

<BASEFONT FACE="Arial, Helvetica" SIZE=2>
<BODY  bgcolor="#FFFFD5">

<H3>Right Example</H3>

<CFIF IsDefined("Form.MyText")>
<!--- if len is 0, then err --->
	<CFIF Len(form.myText) is not 0>
		<CFIF Len(form.myText) LTE form.RemoveChars>
		<P>Your string <CFOUTPUT>#form.myText#</cFOUTPUT>
		only has <CFOUTPUT>#Len(form.myText)#</cFOUTPUT>
		characters.  You cannot output the <CFOUTPUT>#form.removeChars#</cFOUTPUT>
		rightmost characters of this string because it is not long enough
		<CFELSE>
		
		<P>Your original string: <CFOUTPUT>#form.myText#</CFOUTPUT>
		<P>Your changed string, showing only the <CFOUTPUT>#form.removeChars#</CFOUTPUT> rightmost characters:
		<CFOUTPUT>#right(Form.myText, form.removeChars)#</CFOUTPUT>

		</CFIF>



	<CFELSE>

	<P>Please enter a string
	</CFIF>



</CFIF>

<FORM ACTION="right.cfm" METHOD="POST">
<P>Type in some text

<BR><INPUT TYPE="Text" NAME="MyText">

<P>How many characters from the right do you want to show?
<SELECT NAME="RemoveChars">
   <OPTION VALUE="1">1
   <OPTION VALUE="3" SELECTED>3
   <OPTION VALUE="5">5
   <OPTION VALUE="7">7
   <OPTION VALUE="9">9</SELECT>

<INPUT TYPE="Submit" NAME="Remove characters">

</FORM>
</BODY>
</HTML>       
