$s =& Dataface_Table::loadTable('Profiles'); $records = df_get_records_array('Profiles'); if (@$_REQUEST['-action'] == 'update_grid') { $app =& Dataface_Application::getInstance(); $app->display(); exit; } $grid = new Dataface_dhtmlxGrid_activegrid(array('-table' => 'Profiles')); if ($_GET['--dhtmlxGrid_xml']) { if (stristr($_SERVER["HTTP_ACCEPT"], "application/xhtml+xml")) { header("Content-type: application/xhtml+xml"); } else { header("Content-type: text/xml"); } echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n"; echo $grid->toXML(); } else { echo "<html><body>"; echo $grid->toHTML(); echo <<<END \t<div id="output_div"></div> \t<script> \tfunction serializeGrid(){ \tvar output_div = document.getElementById('output_div'); \t//for (var j in {$grid->name}){ \t//\toutput_div.innerHTML += j+"<br>"; \t//} \t//alert({$grid->name}); \tvar xmlstr = {$grid->name}.serialize(); \t \toutput_div.innerHTML = xmlstr;