We have a screen where the top half is a dhtmlxform and the bottom half is a dhtmlxgrid. When the use makes a selection (order number) via a dhtmlxcombo component, the form is populated from a table that carries header data about the order. The grid is supposed to populate with detail data about the order (several lines of items that were ordered). The form works but the grid will not populate. We have been running tests by selecting specific records in the php code. We eventually want to pass the combo selected value through a variable to the php SQL SELECT code. Could someone please review this code and indicate where we are off track.
The pertinent html code is:
Bill of Lading View
<!--Place any other css links here-->
<script type="text/javascript" src="../../dhtmlxSuite/dhtmlx.js"></script>
<script type="text/javascript" src="../../dhtmlxSuite/dhtmlxcommon.js"></script>
<script type="text/javascript" src="../../dhtmlxSuite/dhtmlxcontainer.js"></script>
<script type="text/javascript" src="../../dhtmlxSuite/dhtmlxlayout/codebase/dhtmlxlayout.js"></script>
<script type="text/javascript" src="../../dhtmlxSuite/dhtmlxForm/codebase/dhtmlxform.js"></script>
<script type="text/javascript" src="../../dhtmlxSuite/dhtmlxCalendar/codebase/dhtmlxcalendar.js"></script>
<script type="text/javascript" src="../../dhtmlxSuite/dhtmlxForm/codebase/ext/dhtmlxform_item_calendar.js"></script>
<script type="text/javascript" src="../../dhtmlxSuite/dhtmlxForm/codebase/ext/dhtmlxform_item_container.js"></script>
<script type="text/javascript" src="../../dhtmlxSuite/dhtmlxToolbar/codebase/dhtmlxtoolbar.js"></script>
<script type="text/javascript" src="../../dhtmlxSuite/dhtmlxCombo/codebase/dhtmlxcombo.js"></script>
<script type="text/javascript" src="../../dhtmlxSuite/dhtmlxForm/codebase/ext/dhtmlxform_item_combo.js"></script>
<script type="text/javascript" src="../../dhtmlxSuite/dhtmlxTabbar/codebase/dhtmlxtabbar.js"></script>
<script type="text/javascript" src="../../dhtmlxSuite/dhtmlxGrid/codebase/dhtmlxgrid.js"></script>
<script type="text/javascript" src="../../dhtmlxSuite/dhtmlxGrid/codebase/dhtmlxgridcell.js"></script>
<script type="text/javascript" src="../../dhtmlxSuite/dhtmlxGrid/codebase/excells/dhtmlxgrid_excell_link.js"></script>
<script type="text/javascript" src="../../dhtmlxSuite/dhtmlxGrid/codebase/excells/dhtmlxgrid_excell_grid.js"></script>
<script type="text/javascript" src="../../dhtmlxSuite/dhtmlxDataProcessor/codebase/dhtmlxdataprocessor.js"></script>
<script type="text/javascript" src="../../dhtmlxSuite/dhtmlxConnector/php/codebase/connector.js"></script>
<!-- Place any additional js calls here -->
<script type="text/javascript">
window.dhx_globalImgPath="../../dhtmlxSuite/_dhtmlxGlobalImgs/";
</script>
. . . . . . .
//init grid and set its parameters (this part as always);
mygrid = new dhtmlXGridObject('gridbox');
mygrid.setImagePath("../../dhtmlxSuite/dhtmlxGrid/codebase/imgs/");
mygrid.setHeader("BL_num,Qty,Item,Lot_num,Unit,Haz,ProductDescription,Weight");
mygrid.setInitWidths("75,75,100,100,100,50,*,100");
mygrid.setColAlign("left,left,left,left,left,center,left,left");
mygrid.setColTypes("ro,ed,ro,ed,ro,ch,ro,ro");
mygrid.setSkin("dhx_skyblue");
mygrid.setColSorting("str,str,str,str,str,str,str,str");
mygrid.init();
mygrid.load("php/bl_gridDetail.php");
</script>
PHP code is:
<?php require_once("../../../dhtmlxSuite/dhtmlxConnector/php/codebase/grid_connector.php"); $conn = mysql_connect("localhost","root",""); mysql_select_db("billoflading"); // Database name $gridConn = new GridConnector($conn); $sql = "SELECT * FROM 'blproddetail' WHERE BL_num='54145'"; $gridConn->render_complex_sql($sql,"id","BL_num,Qty,Item,Lot_num,Unit,Haz,ProductDescription,Weight"); ?>Thank you in advance.