?
Solved

How to write Variables In #Trim Statement?

Posted on 2003-12-04
5
Medium Priority
?
257 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
[X]
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
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 2000 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

What Is Blockchain Technology?

Blockchain is a technology that underpins the success of Bitcoin and other digital currencies, but it has uses far beyond finance. Learn how blockchain works and why it is proving disruptive to other areas of IT.

Question has a verified solution.

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

This is a guide to setting up a new WHM/cPanel Server to be used for web hosting accounts. It is intended for web hosting company administrators and dedicated server owners. For under $99 per month (considering normal rate of Big Data Cetnters like …
In our day to day coding, how many times have we come across a necessity to check whether a URL is a broken link or not? For those of you that answered countless and are using ColdFusion like myself, then this article is for you.  It will show yo…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

777 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