We have been evaluating dhtmlxSuite and have found it to be very powerful. But we have created a simple script to load data from a table to a form. Our table has only one record with the id of “1” When the html page is run, you would click on the load button and the 3 fields from the table should load in the input controls on the page. However, they do not. The message from the dataProcessor debugger is:
DataProcessor
Current state
ID:1 Status: updated, validCurrent mode: cell
Log:
row 1367519207879 marked [inserted,valid]
row 1 marked [updated,valid]
The html code is:
<head>
<title>Connection Test</title>
<link rel="STYLESHEET" type="text/css" href="codebase/dhtmlx.css">
<script src="codebase/dhtmlx.js"></script>
<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 src="codebase/connector.js"></script>
<script type="text/javascript">
var myForm,formData;
function doOnLoad() {
formData = [
{type: "button",
value: "Load Data",
name: "ld_bttn",
position:"absolute",
left:10,
top:75},
{type:"input",
name:"bl_num",
labelWidth:75,
label:"Bill of Lading",
position:"absolute",
labelLeft:10,
labelTop:80,
inputTop:80,
inputLeft:100},
{type:"input",
name:"po_num",
labelWidth:75,
label:"PO Number",
position:"absolute",
labelLeft:10,
labelTop:110,
inputTop:110,
inputLeft:100},
{type:"input",
name:"id",
labelWidth:75,
label:"ID",
position:"absolute",
labelLeft:10,
labelTop:50,
inputTop:50,
inputLeft:100},
];
var myForm = new dhtmlXForm("work_area",formData);
var dp = new dataProcessor("formtestconnector.php");
dp.init(myForm);
myForm.attachEvent("onButtonClick", function(buttonID) {
if(buttonID=="ld_bttn"){
myForm.load('formtestconnector.php?id=1');
}
});
}
</script>
</head>
<body onload="doOnLoad()">
<div id="work_area" style="position:absolute;top:145px;width:798px;height:390px;border-style:solid;border-width:1px;border-color:#D6D6D6;">
</div>
</body>
Our php code is (formtestconnector.php):
<?php require_once("form_connector.php"); $conn = mysql_connect("localhost","root",""); mysql_select_db("testBL"); $form = new FormConnector($conn); $form->render_table("connect","id","id,bl_num,po_num"); /* IN RENDER TABLE "id" IS USED TO IDENTIFY WERE TO LOCATE STARTING COLUMN ON DATABASE */ ?>We wish to buy this product to support our development; however the key component is the connection from tables to forms and grids. No matter what we’ve tried, we cannot get it to connect. Please review and send any suggestions to make our test successful. Thank you.