SelectBox to mxAJAX

2 views
Skip to first unread message

Mr. Yohn

unread,
Dec 10, 2008, 11:56:11 PM12/10/08
to mxAjax
I have a page that is an attendance log for a classroom. Each student
has 20+ columns of a table. Each column is a select box with the
attendance option. A - Absent, P - Present, and H - Holiday. Which
mxAJAX script should I be using so that onchange of the select box,
the cfc function is run to insert the data into a database? I do not
want a return to the screen, just the insert in the background.

The CFC Function:

<cffunction name="insertAttendance" returntype="query" output="no">
<cfargument name="id" type="string" required="Yes">
<cfargument name="dateofattendance" type="string" required="Yes">
<cfargument name="attendance" type="string" required="Yes">
<cfset var qReturn = ''>
<cfquery name="insertAttend" datasource="DSN">
INSERT INTO per_attendance
(id,attend_dt,attendance,audit_dt,audit_id)
VALUES
(#cfargument.id#,'#cfarguement.dateofattendance#','#argument.attendance#',#creadodbcdatetime
(now())#,'#cookie.user_id#')
</cfquery>
<cfreturn qReturn>
</cffunction>

James Holmes

unread,
Dec 11, 2008, 6:53:24 AM12/11/08
to mxa...@googlegroups.com
An mxData would do the job - the operation can return a value to
indicate success or failure too.

mxAjax / CFAjax docs and other useful articles:
http://www.bifrost.com.au/blog/



2008/12/11 Mr. Yohn <ay...@yohnder.com>:
Reply all
Reply to author
Forward
0 new messages