Form posts no variables with Connector/DataProcessor

Hi,

I was essentially trying to duplicate the sample found at :
dhtmlx.com/docs/products/dht … _save.html

When I ran your sample code exactly as shown in the sample locally (with the removal of a couple of extra semicolons in the attachEvent section), the actual field variables would not be posted back to the server (only ids). I had started with a more complex example, and whittled it down to a more or less exact copy of the code in the sample.

I was eventually able to get it to work – by downloading and replacing the common, form and dataprocessor JS files with the ones that were called by the sample. Everything worked fine with those with no code changes. Replacing with the official downloads again immediately broke the functionality.

Here’s the log with the support files as downloaded officially:

[code]====================================
Log started, 19/07/2011 01:07:54

While there is no edit mode mark, POST parameters similar to edit mode detected. \n Switching to edit mode ( to disable behavior remove POST[ids]

DataProcessor object initialized
ids => 2

Row data [2]

Edit operation finished

Done in 0.0013010501861572s
[/code]

Here’s the log data when I replaced with the files from the sample server:

Log started, 19/07/2011 05:07:05
====================================

While there is no edit mode mark, POST parameters similar to edit mode detected. \n Switching to edit mode ( to disable behavior remove POST[ids]

DataProcessor object initialized
3_last_name => Smith
3_first_name => Ivan
3_person_class_id => 2
3_!nativeeditor_status => updated
ids => 3

Row data [3]
last_name => Smith
first_name => Ivan
person_class_id => 2
!nativeeditor_status => updated

UPDATE person SET last_name='Smith',first_name='Ivan',person_class_id='2' WHERE person_id='3'

Edit operation finished
0 => action:updated; sid:3; tid:3;

Done in 0.049574851989746s

Could you verify that the libraries posted on the site will work with your sample? If not, what am I doing wrong here?

Supporting Info
connector PHP:

<?php require("codebase/form_connector.php"); $res=mysql_connect("s","u","p"); mysql_select_db("db"); $formConn = new FormConnector($res,"MySQL"); $formConn->render_table("person","person_id","last_name,first_name,person_class_id"); ?>

site code:

<body onLoad="doOnLoad()">
<link rel="stylesheet" type="text/css" href="codebase/skins/dhtmlxform_dhx_skyblue.css">
<script src="codebase/dhtmlxcommon.js"></script>
<script src="codebase/dhtmlxform.js"></script>
<script src="codebase/dhtmlxdataprocessor.js"></script>
<script src="codebase/dhtmlxdataprocessor_debug.js"></script>
<script>
var myForm, formData;
function doOnLoad() {
    formData = [{
        type: "settings",
        position: "label-left",
        labelWidth: 100,
        inputWidth: 120
    }, {
        type: "fieldset",
        label: "Welcome",
        inputWidth: "auto",
        list: [{
            type: "input",
            label: "First Name",
            name: "first_name",
            value: ""
        }, {
            type: "input",
            label: "Last Name",
            name: "last_name",
            value: ""
        }, {
            type: "input",
            label: "Class ID",
            name: "person_class_id",
            value: ""
        }, {
            type: "button",
            value: "Load set 1",
            name: "set1"
        }, {
            type: "button",
            value: "Load set 2",
            name: "set2"
        }, {
            type: "button",
            value: "Load set 3",
            name: "set3"
        }, {
            type: "button",
            value: "Save",
            name: "send"
        }]
        }];
    myForm = new dhtmlXForm("myForm", formData);
    myForm.attachEvent("onButtonClick", function(id) {
        if (id == "set1")myForm.load('./form.php?id=2');
        if (id == "set2")myForm.load('./form.php?id=4');
        if (id == "set3")myForm.load('./form.php?id=6');
        if (id == "send")myForm.save();
		alert(myForm.getItemValue("first_name"));
    });
    var dp = new dataProcessor("./form.php");
    dp.init(myForm);
}
</script>
 
<div id="myForm" style="height:260px;"></div>