Paul,

Just wrote and tried this on CF5

<cfif IsDefined("form.thisColour")>
   <cfset cleanColour = replace(form.thisColour,chr(35),"","ALL")>
   <cfoutput>"#form.thisColour#" - "#cleanColour#"<br></cfoutput>
</cfif>
<form name="test" action="test.cfm" method="post">
<input name="thisColour" type="text" size="10" maxlength="10"><br>
<input type="submit" name="submit" value="submit">
</form>

It lets me enter #ffffff and outputs the form variable with the hash still
in there and the form variable without the hash quiet happily.

What's the error you are getting with your code?  Are you sure that your
form variable is defined?

Regards

Stephen
----- Original Message -----
From: "Paul Giesenhagen" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, February 18, 2003 2:31 PM
Subject: Re: Replacing the #


> It is a form variable .. actually it is a Hex color #FFFFFF (I need to
> remove the Pound sign).
>
> Paul Giesenhagen
> QuillDesign
>
> ----- Original Message -----
> From: "Pablo Varando" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Tuesday, February 18, 2003 12:35 AM
> Subject: Re: Replacing the #
>
>
> > OK, where are you getting the variable from.. are you setting at the top
> > with CFSET? or is comeing a DB, etc?
> >
> > Pablo
> > ----- Original Message -----
> > From: "Paul Giesenhagen" <[EMAIL PROTECTED]>
> > To: "CF-Talk" <[EMAIL PROTECTED]>
> > Sent: Tuesday, February 18, 2003 12:09 AM
> > Subject: Re: Replacing the #
> >
> >
> > > It currently isn't in a CFOUTPUT it errors on the <cfset>
> > >
> > > Toughy huh?!
> > >
> > > Paul Giesenhagen
> > > QuillDesign
> > > ----- Original Message -----
> > > From: "Pablo Varando" <[EMAIL PROTECTED]>
> > > To: "CF-Talk" <[EMAIL PROTECTED]>
> > > Sent: Tuesday, February 18, 2003 12:07 AM
> > > Subject: Re: Replacing the #
> > >
> > >
> > > > What about this:
> > > >
> > > > <!--- put this OUTSIDE A CFOUTPUT --->
> > > > <cfset StringToSearch = "#">
> > > > <!--- Put this anywhere you want in the page --->
> > > > <cfset thisItem = ReplaceNoCase(thisItem, StringToSearch, "",
"ALL")>
> > > >
> > > > That Should work..... give it a try and let me know...
> > > >
> > > > Pablo
> > > >
> > > >
> > > > ----- Original Message -----
> > > > From: "Paul Giesenhagen" <[EMAIL PROTECTED]>
> > > > To: "CF-Talk" <[EMAIL PROTECTED]>
> > > > Sent: Monday, February 17, 2003 11:51 PM
> > > > Subject: Re: Replacing the #
> > > >
> > > >
> > > > > Just tried it, and nope, it didn't work ...
> > > > >
> > > > > Thanks for trying though...
> > > > >
> > > > > Paul Giesenhagen
> > > > > QuillDesign
> > > > >
> > > > > ----- Original Message -----
> > > > > From: "Pablo Varando" <[EMAIL PROTECTED]>
> > > > > To: "CF-Talk" <[EMAIL PROTECTED]>
> > > > > Sent: Monday, February 17, 2003 11:53 PM
> > > > > Subject: Re: Replacing the #
> > > > >
> > > > >
> > > > > > Try this:
> > > > > >
> > > > > > <cfset thisItem = ReplaceNoCase(thisItem, chr(35), "", "ALL")>
> > > > > >
> > > > > > That should work...
> > > > > >
> > > > > > Pablo
> > > > > > ----- Original Message -----
> > > > > > From: "Paul Giesenhagen" <[EMAIL PROTECTED]>
> > > > > > To: "CF-Talk" <[EMAIL PROTECTED]>
> > > > > > Sent: Monday, February 17, 2003 10:45 PM
> > > > > > Subject: Replacing the #
> > > > > >
> > > > > >
> > > > > > > I am trying to check a variable to make sure it doesn't have a
#
> > > sign
> > > > in
> > > > > > the variable and if it does, I want to remove it.  Here is what
I
> > > have,
> > > > > but
> > > > > > it errors out with 1 (makes sense), but it doesn't replace if I
> have
> > > > two!
> > > > > > Any suggestions?
> > > > > > >
> > > > > > > <cfset thisItem = ReplaceNoCase(thisItem, "#", "", "ALL")>
<!---
> > > > Errors
> > > > > > out --->
> > > > > > >
> > > > > > > <cfset thisItem = ReplaceNoCase(thisItem, "##", "", "ALL")>
> <!---
> > > > > Doesn't
> > > > > > replace --->
> > > > > > >
> > > > > > > Thanks
> > > > > > > Paul Giesenhagen
> > > > > > > QuillDesign
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

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

Reply via email to