Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CFOUTPUT Troubles

Status
Not open for further replies.

msscott

Programmer
Sep 12, 2001
8
US
Hello all-
I have created an update form which contains two field types: text and text area. The problem is with the text fields. If I insert a record at my input form page and use quotations in any of the text fields, it inserts fine. However, if I bring up that record in the update form, the quotations in the text fields cause my update form to freak out (the table cells which contain the fields shift out of position, the fields containing the quotes come up empty, etc.). If, in the insert form, I use the HTML symbol for quotations (rather than actual quotes), the update page behaves normally. Has anyone else encountered this strange problem?
Thanks!
Shane
 
you have to consider special characters in cf as well as html. qutes are one of them. consider this example:

<input type=&quot;text&quot; value=&quot;somevalue&quot;>

this peace of code will create text field that will have predefined 'somevalue' string written in it, right?

ok, now let's consider this:

the value you are bringing through cf database or some other way is enclosed in the quotations (e.g. &quot;somevalue&quot;);
if you think of that as a string (quotations included), and output that in the value attribute of the input element using some variable like this:

<input type=&quot;text&quot; value=&quot;#variable#&quot;>

from the html perspective what will be seen is:

<input type=&quot;text&quot; value=&quot;&quot;somevalue&quot;&quot;>

do you see my point here? the value attribut has open and then closed qoutations without acctual value in it and the code after that will probably cose the mess on the rest or the page;

to see how your acctual html code looks like, preview your page in the browser and then check the source in the browser; analize that part see what is acctualy happening

hope this help Sylvano
dsylvano@hotmail.com

&quot;every and each day when I learn something new is a small victory...&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top