almost EVERY TIME you include the content of a CF variable onto an HTML page
you will want to wrap it in "HTMLEDITFORMAT()"
so your input would look like:

<input type="text" name="txtFName" value="#htmleditformat(FORM.txtFName)#">

Jann
-----Original Message-----
From: Bryan Stevenson [mailto:[EMAIL PROTECTED]
Sent: Monday, November 10, 2003 1:08 PM
To: CF-Talk
Subject: input boxes ande double quotes

Hey All,

Old issue, but I'm checking the consensus....

Let's say we have this:
<input type="text" name="txtFName" value="#FORM.txtFName#">

and the form posts back to itself which kicks in some validation....an error
is found and the form is re-displayed along with an error message and
populated with exatly what the user typed (pretty standard stuff).

So all works fine unless you start throwing some double quotes into that
input box.  If you do that then the value can be truncated (let's say they
entered "Biff" as the name...with the double quotes).  That means the HTML
produced on re-display is like this:
<input type="text" name="txtFName" value=""Biff"">

So now the value is technically "" or blank because it got truncated (you
now have value="" and Biff"").

So what does everybody do about this?

TIA

Cheers

Bryan Stevenson B.Comm.
VP & Director of E-Commerce Development
Electric Edge Systems Group Inc.
t. 250.920.8830
e. [EMAIL PROTECTED]

---------------------------------------------------------
Macromedia Associate Partner
www.macromedia.com
---------------------------------------------------------
Vancouver Island ColdFusion Users Group
Founder & Director
www.cfug-vancouverisland.com


[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to