The UDF's are stored in a separate directory and then included and coppied into an
application scope (which is pointed to in request) ... The functions themselves look
like this:
<cffunction name="alttext" returntype="string"
hint="returns an alternating string dependant on whether itemid indicates an existing
db record">
<cfargument name="itemid" type="string" required="true">
<cfargument name="no" type="string" default="New">
<cfargument name="yes" type="string" default="Edit">
<cfif not isnumeric(itemid)>
<cfset itemid = len(trim(itemid))></cfif>
<cfreturn arguments[yesnoformat(itemid)]>
</cffunction><cfset request.ff.fstor("alttext")>
and this:
<cffunction name="structtourl" returntype="string" hint="returns the elements of a
structure as a query string">
<cfargument name="mystruct" type="struct" required="true">
<cfset var i = "">
<cfset var myarray = arraynew(1)>
<cfloop item="i" collection="#mystruct#">
<cfif issimplevalue(mystruct[i])>
<cfset arrayappend(myarray,lcase(trim(i)) & "=" &
urlencodedformat(mystruct[i]))>
</cfif>
</cfloop>
<cfreturn trim(arraytolist(myarray,"&"))>
</cffunction>
<cfset request.ff.fstor("structtourl")>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community. http://www.fusionauthority.com/ads.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4