I think Bob was on the right track, and the issue would be more with the SQL
being generated to store the data, rather than this set of code you've
offered for displaying it. Even though you can't turn on debugging on your
remote server, if you can create another copy of the form and form
processing page, modify the form to submit to the new processing page, and
on the new processing page change the CFQUERY statement to a CFOUTPUT. Just
that, nothing else (of course, change the opening and closing CFQUERY tags
to CFOUTPUT). Then do an abort, and look at the output. This will be the SQL
that would have been sent to the database.

If your database allows you to use double quotes around the value being
inserted, then indeed the double quotes in the <A href=""> will cause
termination of the string.

Then again, you said that it was rearranging the order, so there may still
be more to this. I'd still argue (as I did a couple notes ago) that you
should output the data just before it goes in the DB and just as it comes
out, to prove if it's changing in the database. This change of the CFQUERY
to a CFOUTPUT is a slightly different take on the same thing.

/charlie

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of Graham Faulkner
Sent: Tuesday, March 05, 2002 3:11 PM
To: [EMAIL PROTECTED]
Subject: Re: [CFTALKTor] using HTML in TEXTAREA of CFFORM


Hi Bob,

The hosting is via a shared hosting environment, so I don't have that luxury
(I assume... any CrystalTech users out there know different?).

What the page does is perform a query, and then assign data to the various
form variables.

<cfquery datasource="dsn_name" name="getEvent">
 SELECT *
 FROM events
 WHERE EventID = #EventID#
</cfquery>

...

various <cfset>'s e.g. <cfset Location = Trim(getEvent.Location)>

....


Then the line where the Description information is assigned.  Would trim()
cause the problems?

 <cfset Description = Trim(getEvent.Description)>



Then in the form, the <textarea> is filled with #Description#, with a
<cfoutput> in the respective place around the form.

Blessings,

Graham


----- Original Message -----
From: "Bob Silverberg" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 05, 2002 2:35 PM
Subject: RE: [CFTALKTor] using HTML in TEXTAREA of CFFORM


> If you don't have a problem with simple tags like <b>, <i>, and <p>, but
you
> are having problems with tags with attributes like <a href="">, then my
> guess is that it might have something to do with the quotes surrounding
the
> attributes. Those may be messing up your SQL statement.  Are you able to
> turn debugging on, so that you can see the actual query that's being
passed
> to the database?  That would probably help immensely.
>
> Bob
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> > Behalf Of Graham Faulkner
> > Sent: Wednesday, 6 March 2002 6:20 a.m.
> > To: [EMAIL PROTECTED]
> > Subject: Re: [CFTALKTor] using HTML in TEXTAREA of CFFORM
> >
> >
> > Hi Charlie,
> >
> > You're exactly right.  With the admin tool they are able to enter the
> > information, but then can go back and make changes if needed.  When I
> > re-edit information from the original textarea and saved to the db that
> > includes HTML, the populated textarea is messed up with extraneous HTML.

> > The actual output to the website via a #ParagraphFormat# seems to
> > work fine.
> >
> > What would be the problem(s) with the database that I need to
> > look for?  It
> > saves plain text without problems, so it's not a matter of saving or not
> > saving the information.  It's the HTML in the textarea that's giving me
a
> > headache.  Simple HTML tags like <b> and <i> and <p> don't cause
problems.
> > It seems to be <a href>'s that are messing things up.  Does that
> > clue you in
> > to what could be the issue?
> >
> > Blessings,
> >
> > Graham
> >
> > ----- Original Message -----
> > From: "charles arehart" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Tuesday, March 05, 2002 11:57 AM
> > Subject: RE: [CFTALKTor] using HTML in TEXTAREA of CFFORM
> >
> >
> > > Glad to hear that the tag has helped, Bill. It's my tag. :-)
> > >
> > > But I'm not sure that it will help in Graham's case. Graham, you're
not
> > > trying to display the code that was entered in the textarea in
anything
> > than
> > > another textarea, right? My tag would be useful if you were,
> > but it seems
> > > you're giving them the chance to edit what was entered, saved
> > in a DB and
> > > retrieved for edit, right? And you're showing the code in another
> > Textarea,
> > > right?
> > >
> > > It seems then that the problem may be in the database. I mean, have
you
> > > displayed the code before the insert, and then after retrieving it
from
> > the
> > > database? If you view it in a textarea, it should look just like they
> > > entered it (HTML and all). If you wanted to view it outside a
> > textarea and
> > > wanted to see the raw HTML, that's what the HTMLCodeFormat function is
> > for,
> > > as you mentioned.
> > >
> > > If you did for some reason want to view the code not as HTML
> > and not in a
> > > textarea but instead just for display as HTML, that's where my tag
comes
> > in.
> > > Whereas the ParagraphFormat converts double carriage returns to
> > a <p>, it
> > > doesn't convert a single carriage return to a <br>, nor does it
respect
> > > spaces or tabs entered or copied into the textarea. Those are
> > the problems
> > > that CF_TextAreaFormat would help solve.
> > >
> > > But I don't think that's really the challenge you're facing.
> > >
> > > /charlie
> > >
> > > -----Original Message-----
> > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> > > Behalf Of Bill Sourour
> > > Sent: Tuesday, March 05, 2002 9:10 AM
> > > To: [EMAIL PROTECTED]
> > > Subject: Re: [CFTALKTor] using HTML in <TEXTAREA> of <CFFORM>
> > >
> > >
> > > For handling these types of issues, I always use this custom tag and
it
> > > seems to work great.
> > >
> > > http://www.systemanage.com/cff/textareaformat_help.cfm
> > >
> > > Give it a go.
> > >
> > > ----- Original Message -----
> > > From: "Graham Faulkner" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Tuesday, March 05, 2002 9:07 AM
> > > Subject: [CFTALKTor] using HTML in <TEXTAREA> of <CFFORM>
> > >
> > >
> > > > Hi there,
> > > >
> > > > I'll try to explain this without getting myself, or you, too
> > confused...
> > > =)
> > > >
> > > > I have an online admin tool for my client for their calendar
> > of events.
> > > > They are able to enter the details for the event into a
> > <textarea> field
> > > in
> > > > the <cfform>.  The <textarea> corresponds to a Memo-type field in an
> > > Access
> > > > 2000 database.  The information saved in the db field is outputted
on
> > the
> > > > website using #ParagraphFormat(Description)# so that all paragraph
> > breaks,
> > > > etc. are retained.
> > > >
> > > > However, when I enter in HTML code (e.g. email addresses using <a
> > > > href="mailto:blahblah";>) into the <textarea> it does something funny
> > when
> > > I
> > > > go back in a second time to re-edit the information.  It will
> > copy some
> > of
> > > > the text and place it before the previously existing text.
> > > >
> > > > For example, if I entered the following
> > > >
> > > >     PARAGRAPH START... This is some sample text.  Here is a
> > website you
> > > > should look at: <a href="url here" target="_self">url</a>.  You
should
> > > also
> > > > email the friendly people at CFUG - click <a
> > > > href="mailto:cftalk?subject=this is a test">here</a>.  This
> > is some more
> > > > sample text.
> > > >
> > > > What would happen is that it looks something like this when I
> > go back in
> > > to
> > > > edit it again (copies some of the text and places it at the
> > beginning):
> > > >
> > > >     url here" target="_self">url</a>.  You should also email the
> > friendly
> > > > people at CFUG - click <a href="mailto:cftalk?subjet=this is a
> > > > test">here</a>.  PARAGRAPH START... This is some more sample
> > text. This
> > is
> > > > some sample text.  Here is a website you should look at: <a
href="url
> > > here"
> > > > target="_self">url</a>.  You should also email the friendly people
at
> > > CFUG -
> > > > click <a href="mailto:cftalk?subject=this is a
> > test">here</a>.  This is
> > > some
> > > > more sample text.
> > > >
> > > > What can I do to stop this, but still ensure that they can
> > enter in HTML
> > > > code if desired.  If they type in plain text, it works fine.  It's
the
> > > HTML
> > > > code that's ruining the party. =)  I tried
> > #HTMLCodeFormat(Description)#
> > > in
> > > > the <textarea> but that didn't seem to do the trick.  Any
suggestions
> > > would
> > > > be gratefully appreciated.
> > > >
> > > > Blessings,
> > > >
> > > > Graham
> > >
> > > -
> > > You are subscribed to the CFUGToronto CFTALK ListSRV.
> > > This message has been posted by: "charles arehart"
> > <[EMAIL PROTECTED]>
> > > To Unsubscribe, Please Visit and Login to http://www.CFUGToronto.org/
> > > Manager: Kevin Towes ([EMAIL PROTECTED])
> > http://www.CFUGToronto.org/
> > > This System has been donated by Infopreneur, Inc.
> > > (http://www.infopreneur.net)
> > >
> >
> > -
> > You are subscribed to the CFUGToronto CFTALK ListSRV.
> > This message has been posted by: "Graham Faulkner"
> > <[EMAIL PROTECTED]>
> > To Unsubscribe, Please Visit and Login to http://www.CFUGToronto.org/
> > Manager: Kevin Towes ([EMAIL PROTECTED])
> http://www.CFUGToronto.org/
> This System has been donated by Infopreneur, Inc.
> (http://www.infopreneur.net)
>
>
>
> -
> You are subscribed to the CFUGToronto CFTALK ListSRV.
> This message has been posted by: "Bob Silverberg" <[EMAIL PROTECTED]>
> To Unsubscribe, Please Visit and Login to http://www.CFUGToronto.org/
> Manager: Kevin Towes ([EMAIL PROTECTED])
http://www.CFUGToronto.org/
> This System has been donated by Infopreneur, Inc.
> (http://www.infopreneur.net)
>

-
You are subscribed to the CFUGToronto CFTALK ListSRV.
This message has been posted by: "Graham Faulkner"
<[EMAIL PROTECTED]>
To Unsubscribe, Please Visit and Login to http://www.CFUGToronto.org/
Manager: Kevin Towes ([EMAIL PROTECTED]) http://www.CFUGToronto.org/
This System has been donated by Infopreneur, Inc.
(http://www.infopreneur.net)

-
You are subscribed to the CFUGToronto CFTALK ListSRV.
This message has been posted by: "charles arehart" <[EMAIL PROTECTED]>
To Unsubscribe, Please Visit and Login to http://www.CFUGToronto.org/
Manager: Kevin Towes ([EMAIL PROTECTED]) http://www.CFUGToronto.org/
This System has been donated by Infopreneur, Inc.
(http://www.infopreneur.net)

Reply via email to