Here is the code for an ascii character generator that I wrote.  Its a text
field that will give you up to ten individual ASCII characters from a
string.  


<cfform action="" method="">
<cfoutput>#dateformat(now())#</cfoutput>
<cfinput type="Text" name="date" value="#dateformat(Now(), "dd-mmm-yy")#">
</cfform>


<H3>Asc Example</H3>

<cfparam name="counter" default="">
<cfset counter = '1'>
<!--- if the character string is not empty, then output its ascii value --->
<cfif IsDefined("FORM.charVals")>
<cfloop condition="counter lt len(FORM.charVals)+1">
<cfparam name="value1" default="">
        <CFOUTPUT><cfset value1='#counter#'>
                <cfset value2 = '#mid(FORM.charVals,value1,1)#'>
                        #mid(FORM.charVals,value1,1)#           
#Asc(value2)#</CFOUTPUT>
<Cfset Counter = counter + 1>
</cfloop>
 <CFELSE>
<!--- if it is empty, output an error message --->
        <H4>Please enter a character</H4>       
</cfif>
<FORM ACTION="asc.cfm" METHOD="POST">
<P>Type in a character(s) to see its ASCII value.  No more than 10
characters.
<BR><INPUT TYPE="Text" NAME="CharVals" size="10" MAXLENGTH="10" >
<P><INPUT TYPE="Submit" NAME=""> <INPUT TYPE="RESET">

</FORM>

Bryan Langford 


Analyst
National Customer Operations 
Enterprise Services & Strategic Planning
Training Development and Design Team. 
Desk: 714-695-4824
Cell: 714-270-8451


�


-----Original Message-----
From: Kevin Mansel [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 20, 2001 12:40 PM
To: CF-Talk
Subject: Character Code....


does anyone know the chr() code for  the apostrophe?



~~~~~~~~~~~~~~~~~
Kevin Mansel
Senior Web Developer
Fox Communications
[EMAIL PROTECTED]
DL : 425-649-1321
C : 425-346-7221
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to