• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

ajax using checkboxes

Explorer ,
Mar 20, 2009 Mar 20, 2009

Copy link to clipboard

Copied

i have a ajax form that has 2 dropdowns one for company and the other is fullname linked to the company... but i have a problem in that when it pulls their specific member record they can have several positions in the member category such as president and co founder... which are listed in a seperate table that has the (memberid), (categoryid) and (categoryname)... when i make an ajax input it enters in only one of the several... but i want to have it loop and grab all of the categories that are linked to that member as well as display it next to a checkbox so when they check the box, the javascript i have will delete it from the category... i hope that made sence... here is my cfc code
TOPICS
Advanced techniques

Views

302

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 20, 2009 Mar 20, 2009

Copy link to clipboard

Copied

LATEST
<cffunction name="getmemberinfo" access="remote" returnType="struct">
<cfargument name="cid" type="numeric" required="true">
<cfset var memcat="">
<cfset var c = "">
<cfset var f = structNew()>
<cftry>
<cfquery name="memcat" datasource="#applicationdsn#">
SELECT members.memberrecordid, CategorData.CatdataId, Category.CatId, Category.Category, Contacts.cid
FROM CategorData FULL OUTER JOIN
Category ON CategorData.CatId = Category.CatId FULL OUTER JOIN
members ON CategorData.memberrecordid = members.memberrecordid FULL OUTER JOIN
Contacts ON members.cid = Contacts.cid
WHERE Category.CatId= <cfqueryparam cfsqltype="cf_sql_integer" value="#arguments.cid#">
</cfquery>
<!--- --->
<cfloop list="#memcat.columnlist#" index="c">
<cfset f = data[1]>
</cfloop>
<cfcatch type="any">
<cfset returnStruct.success = false />
<cfset returnStruct.message = cfcatch.message />
</cfcatch>
</cftry>
<cfreturn f>
</cffunction>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation