You can't do what you're wanting to do -- CF doesn't have dynamic evaluation
of code like some other languages do like Javascript eval("blah blah " +
myvar);

Instead, what you can do is this:

<cfset my = structnew()>
<cfset my.attribute1 = 1>
<cfset my.attribute2 = 2>
<cf_my_customtag attributecollection="#my#">

Remember to include quotes around all your attributes. :)


> Hi everyone,

> I have a custom tag where I want to insert attributes and
> their values to
> this custom tag using  another string type variable and
> then execute the
> custom tag.

> But I could not.

> Here is the code:

> Instead of writing
> <my_custom_tag  attribute1=1 attribute2=2>

> I want to write
> <cfset  string = "attribute1=1 attribute2=2">
> <my_custom_tag  #string#>

> The error says:
> Invalid CFML construct found on line 1 at column 19.
> ColdFusion was looking
> at the following text:
> attribute1


> Thanks in advance.

> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ~~~~~~~~~~~|
> Archives:
> http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
> Subscription: http://www.houseoffusion.com/cf_lists/index.
> cfm?method=subscribe&forumid=4
> FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
> Structure your ColdFusion code with Fusebox. Get the
> official book at http://www.fusionauthority.com/bkinfo.cfm

>                               Unsubscribe: http://www.houseoffusion.com/cf_lists/uns
>                               ubscribe.cfm?user=633.558.4



s. isaac dealey                954-776-0046

new epoch                      http://www.turnkey.to

lead architect, tapestry cms   http://products.turnkey.to

tapestry api is opensource     http://www.turnkey.to/tapi

certified advanced coldfusion 5 developer
http://www.macromedia.com/v1/handlers/index.cfm?ID=21816

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to