Hello,

Needing a quick fix on an app that isn't mine, but just can't work this one out at 
all, late in the day and my brain just does not seem to be working!... 

the Form input is converting the '-' to it's ISO equivalent and my brain is farting so 
much that I just can't solve this at all... ?


<!--- Code to test it ---> 

Put in '00−91−80−11223344' as the phone number 

<cfif NOT IsDefined("FORM.Submit")> 
        <form name="here" action="<cfoutput>#CGI.SCRIPT_NAME#</cfoutput>" 
method="post"> 
                <input type="text" name="AR_TEL1" value="" /> 
                <input type="submit" name="Submit" /> 
        </form> 
<cfelse> 
        <!--- DAC: Added in RE Replace to strip all non number characters out of any 
of the phone number ---> 
        <cfset FORM.AR_TEL1 = FORM.AR_TEL1> 
        <cfset FORM.AR_TEL2 = "00kjsdfh12jhkjhkj34lhj5k56;lkj78788'9l;k"> 
        
        <cfdump var="#FORM.AR_TEL1#"><br /> 
        <cfdump var="#FORM.AR_TEL2#"><br /><br /> 
        
        
        <!--- DAC: Added in RE Replace to strip all non number characters out of any 
of the phone number ---> 
        <cfset FORM.AR_TEL1 = REReplaceNoCase(FORM.AR_TEL1, "[^0-9]*", "", "ALL")> 
        <cfset FORM.AR_TEL2 = REReplaceNoCase(FORM.AR_TEL2, "[^0-9]*", "", "ALL")> 
        
        
        <!--- DAC: Added in RE Replace to strip all non number characters out of any 
of the phone number ---> 
        <cfdump var="#FORM.AR_TEL1#"><br /> 
        <cfdump var="#FORM.AR_TEL2#"> 
</cfif> 


<!--- Output ---> 
        00&#8722;91&#8722;80&#8722;3211504 <br /> 
        00kjsdfh12jhkjhkj34lhj5k56;lkj78788'9l;k<br /><br /> 
                
        0087229187228087223211504<br /> 
        001234556787889 


<!--- Desired Output ---> 
        00-91-80-3211504 <br /> 
        00kjsdfh12jhkjhkj34lhj5k56;lkj78788'9l;k<br /><br /> 
                
       0091803211504<br /> 
        001234556787889 


Ie all wrong the form submission is automatically converting the '-' to '&#8722;'... 
what is going on, any pointers on solving this?  Any functions to convert back? DC 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
http://www.cfhosting.com

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to