Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!--- Place this in your ContentRenderer.cfc --->
- <!--- Pass in a comma-delimited list of $.event() variables and the function loops over them, returning non-null
- variables paired with their values --->
- <cffunction name="createQueryString">
- <cfargument name="items" list="true">
- <cfset var count = "">
- <cfset var queryList = "">
- <cfset var qStringItem = "">
- <cfset var item = "">
- <cfset var itemValue = "">
- <cfloop index="count" list="#argument.items#">
- <cfset item = $.event(count)>
- <cfif Len(item) gt 0>
- <cfset itemValue = Evaluate($.event(count))>
- <cfset qStringItem = "#item#=#itemValue#">
- <cfset queryList = ListAppend(queryList, qStringItem, "&")>
- </cfif>
- </cfloop>
- <cfreturn queryList>
- </cffunction>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement