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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Custom Tag

Status
Not open for further replies.

cfm

Programmer
Mar 27, 2001
76
CL
hello..

I'm have a this custom tag

<!--------add.cfm---------------------------->
<cfparam name=&quot;n1&quot; default=&quot;0&quot; type=&quot;numeric&quot;>
<cfparam name=&quot;n2&quot; default=&quot;0&quot; type=&quot;numeric&quot;>

<cfset res=n1 + n2>
<!--------end add.cfm------------------------>


I call like this

<cf_add n1=&quot;21&quot; n2=&quot;10&quot;>
<cfoutput>#res#</cfoutput>

but, didn´t worked

thanks.
 
I don't know why Allaire doesn't make a special section on writing custom tags in CFdocs that just tells how to do this but here's the revised code.

<!--------add.cfm---------------------------->
<cfparam name=&quot;attributes.n1&quot; default=&quot;0&quot; type=&quot;numeric&quot;>
<cfparam name=&quot;attributes.n2&quot; default=&quot;0&quot; type=&quot;numeric&quot;>

<cfset res=attributes.n1 + attributes.n2>
<!--------end add.cfm------------------------>

Tony Hicks.. webmaster@bibleclicks.com
 
yeah!!! it's worked!!!

thanks you...
 
Hey.. no problem.. I had the same problem unfortunately over at forums.allaire.com no one would waste the time posting..

Have a good one.

Tony
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top