Solved

How to write Variables In #Trim Statement?

Posted on 2003-12-04
5
245 Views
Last Modified: 2013-12-24
i want to write the following:

<CFINPUT NAME="Type" TYPE=text VALUE="#Trim(<cfoutput>#url.table#.Type</cfoutput>)#" SIZE="20" REQUIRED="yes" MESSAGE="Check Type Field">

I get an error:

--------------

Invalid CFML construct found on line 14 at column 55.  
ColdFusion was looking at the following text:
url.table

The CFML compiler was processing:

an expression beginning with "#", on line 14, column 54.This message is usually caused by a problem in the expressions structure.
an expression beginning with "Trim", on line 14, column 49.This message is usually caused by a problem in the expressions structure.
the tag attribute "VALUE", on line 14, column 41.
a CFINPUT tag beginning on line 14, column 11.
 
 
The Error Occurred in C:\CFusionMX\wwwroot\rbuck\pages\admin\editLand.cfm: line 14
 
12 :   <TR>
13 :     <TD><STRONG><FONT COLOR="#FF0000" SIZE="-1">Type:</FONT></STRONG></TD>
14 :     <TD> <CFINPUT NAME="Type" TYPE=text VALUE="#Trim(#url.table#.Type)#" SIZE="20" REQUIRED="yes" MESSAGE="Check Type Field"></TD>
15 :   </TR>
16 :   <TR>


----------------
Any ideas?
 
0
Comment
Question by:zakirdavis
  • 3
5 Comments
 
LVL 11

Expert Comment

by:hart
ID: 9874033
#url.table#.Type - what is this

u r passing something in the url what is the name of that variable...

Regards
Hart
0
 
LVL 1

Accepted Solution

by:
techy6 earned 500 total points
ID: 9874034
Too many # signs.  Try this: (you may need to put <cfoutput> round the value attribute):

<CFINPUT NAME="Type" TYPE="text" VALUE="#Trim(url.table)#" SIZE="20" REQUIRED="yes" MESSAGE="Check Type Field">
0
 
LVL 11

Expert Comment

by:hart
ID: 9874054
is url.table a structure then try this


VALUE="<cfoutput>#Trim(evaluate('#url.table#.Type'))#</cfoutput>"


Regards
Hart
0
 

Author Comment

by:zakirdavis
ID: 9874501
url.table is not a structure.

It is simply the name of my table passed through in url.

I fixed the problem by the way.
0
 
LVL 11

Expert Comment

by:hart
ID: 9880052
u confused me totally by writting url.table.type... :-)
anywayz good that u solved it...


Regards
Hart
0

Featured Post

Easy, flexible multimedia distribution & control

Coming soon!  Ideal for large-scale A/V applications, ATEN's VM3200 Modular Matrix Switch is an all-in-one solution that simplifies video wall integration. Easily customize display layouts to see what you want, how you want it in 4k.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question