Jquery DataTables Editable example for Cold Fusion server-side page
Jquery DataTables Editable example for Cold Fusion server-side page
yoshismokey
Posts: 2Questions: 0Answers: 0
I am new to DataTables Editable and have it set up to the point of actually updating the record in the database. There are examples for PHP but none for Cold Fusion.
For some reason, it loads the page again in the form window and doesn't give any error message. I am using Firebug and the post request has status of 200 ok.
Here is my calling page:
[code]
Select *,[question id] as qid,[question text] as qtext
from questions
WHERE questions.groups IN
(Select GroupID from [Group] WHERE
GroupID = '#url.Group_ID#')
AND objective = 1
order by sequence,[question id]
SELECT Name AS GroupName
FROM [Group]
Where GroupID = #url.Group_ID#
select poname,poid from poname where poid=#url.po_ID#
$(document).ready( function () {
$('#data').dataTable().makeEditable({
sUpdateURL: "updateQuestions.cfm",
sReadOnlyCellClass: "read_only"
});
});
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--- JavaScript --->
View Tasks
Tasks for #poData.poname#
Group: #getGroup.GroupName#
Question ID
Question Text
#qid#
#qtext#
[/code]
Here is my updateQuestions.cfm code (to actually update the database:
[code]
UPDATE questions
SET [question text] = '#value#'
WHERE [question ID] = '#id#'
[/code]
Any help would be greatly appreciated! Thanks.
I used the DataTables debugger and this is my code: onadam
For some reason, it loads the page again in the form window and doesn't give any error message. I am using Firebug and the post request has status of 200 ok.
Here is my calling page:
[code]
Select *,[question id] as qid,[question text] as qtext
from questions
WHERE questions.groups IN
(Select GroupID from [Group] WHERE
GroupID = '#url.Group_ID#')
AND objective = 1
order by sequence,[question id]
SELECT Name AS GroupName
FROM [Group]
Where GroupID = #url.Group_ID#
select poname,poid from poname where poid=#url.po_ID#
$(document).ready( function () {
$('#data').dataTable().makeEditable({
sUpdateURL: "updateQuestions.cfm",
sReadOnlyCellClass: "read_only"
});
});
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--- JavaScript --->
View Tasks
Tasks for #poData.poname#
Group: #getGroup.GroupName#
Question ID
Question Text
#qid#
#qtext#
[/code]
Here is my updateQuestions.cfm code (to actually update the database:
[code]
UPDATE questions
SET [question text] = '#value#'
WHERE [question ID] = '#id#'
[/code]
Any help would be greatly appreciated! Thanks.
I used the DataTables debugger and this is my code: onadam
This discussion has been closed.
Replies