How to write Variables In #Trim Statement?

Posted on 2003-12-04
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:

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?
Question by:zakirdavis
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
LVL 11

Expert Comment

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

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


Accepted Solution

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">
LVL 11

Expert Comment

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



Author Comment

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.
LVL 11

Expert Comment

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


Featured Post

The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

Question has a verified solution.

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

Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

691 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