Hi Alexandra
i tried to load some data but nothing…
i insert here my code and let’s see if you can find the error.
i have a database with just one record to try and the key is “codicefiscale”. I want show for example the name of “citta” column. here below is how i have done.
as i told you i wanna see the name of the “citta” column in a dataview. i created a template below a showed
--------------------INDEX HTML PROGRAM----------------------
Il Pianeta Dei Clown
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<SCRIPT type=text/javascript src="codebase/dhtmlxcommon.js"></SCRIPT>
<SCRIPT type=text/javascript src="codebase/dhtmlx.js"></SCRIPT>
<SCRIPT type=text/javascript src="functions.js"></SCRIPT>
<SCRIPT type=text/javascript src="conn_codebase/connector.js"></SCRIPT>
<SCRIPT type=text/javascript src="codebase/dhtmlxdataprocessor.js"></SCRIPT>
<LINK rel=STYLESHEET type=text/css href="stili.css">
<LINK rel=STYLESHEET type=text/css href="codebase/dhtmlx.css">
<LINK rel=STYLESHEET type=text/css href="codebase/gridskins/dhtmlxgrid_dhx_costum.css">
<div id="Tab"></div>
<div id="clowninfo">
<div class="dati" >
<div style="text-align:left">
<font size="4" color="black" style=" font-family:Segoe Script">Codice Fiscale:</font>
</div>
<div style="text-align:center">
<span class="b">#citta#</span>
</div>
</div>
</div>
'-----------------------------------------------------------------
here below instead there is my functions in js.
'------------------------FUNCIOTNS---------------------------
var tab, layout, grid, dataview;
function init() {
tab = new dhtmlXTabBar("Tab", "top");
tab.setImagePath("codebase/imgs/");
tab.addTab("tab1", "Membri Clown", "130px");
tab.setCustomStyle("tab1", "black", "red", "font-style:arial; font-size:16");
tab.addTab("tab2", "Ricevute", "100px");
tab.setCustomStyle("tab2", "black", "red", "font-style:arial; font-size:16");
tab.addTab("tab3", "Amministrazione", "140px");
tab.setCustomStyle("tab3", "black", "red", "font-style:arial; font-size:16");
layout = tab.cells("tab1").attachLayout("2U");
tab.setTabActive("tab1");
layout.cells("a").setText("Lista Membri");
layout.cells("b").setText("Dettaglio Clown");
layout.setSkin("dhx_costum");
grid = layout.cells("a").attachGrid();
grid.setImagePath("codebase/imgs/");
grid.setHeader("Nome, Cognome, Nome Clown");
grid.attachHeader("#text_filter,#text_filter,#text_filter");
grid.setColWidth("*,*,*");
grid.setColTypes("ed,ed,ed");
grid.setSkin("dhx_costum");
grid.setColSorting("str,str,str");
grid.init();
grid.enableSmartRendering(true);
grid.enableAlterCss("dispari", "pari");
grid.loadXML("php/load_clown.php");
grid.attachEvent("onRowSelect", select_grid_row);
dataview = layout.cells("b").attachDataView({
type: {
template:"html->clowninfo",
padding: 5,
height: 40
}
});
dataview.load("php/prova.php");
}
and here below there is
----------------------prova.php file--------------
<?php
require("../conn_codebase/dataview_connector.php");
$conn=mysql_connect("localhost","root","");
$database = mysql_select_db("clown");
$data = new DataViewConnector($conn,"MySQL");
$data->render_table("membri","codicefiscale","citta");
mysql_close();
?>
this is what i have done…but it doesn’t show the dataview in layout cell “b”
hope you can find the error…
thanks for all
Stefano