I have developed a database for displaying quotes using a php connector/dataprocessor approach. Everything seemed to be working nicely until I tried to presort the data via a URL manipulation. It works fine with a Safari browser, but displays XML to the screen in Firefox. (XML appears to be sorted).
My experience is this usually means a problem with extra lines or syntax errors that one browser picks up and another smooths over. I have tried to find the issue but can’t, and would appreciate advice. I have a Pro license:
My simple html program is:
[code]
Sliwa's Quotebase - A Collection of Extraordinary Quotations
<div style="font-size:20px; margin-top: 100px; text-align:center;"></div>
<div id="gridbox" width="90%" height="500px" style="background-color:white; overflow:hidden;
margin-left:auto; margin-right:auto; margin-top: -100px;"></div>
</div>
<table align = "center"><tr><td id="pagingArea" align = "center"></td></tr></table>
</div>
<div align="center" style="background-color:white; margin-left:auto; margin-right:auto;">
<input type="button" name="add" value="Append Row" onclick="var id=mygrid.uid(); mygrid.addRow(id); mygrid.showRow(id)">
<input type="button" name="delete" value="Delete Selected Row" onclick="mygrid.deleteSelectedRows()">
<input type="button" name="Excelsave" value="Save to Excel" onclick="mygrid.toExcel(' . "'/dhtmlx/dhtmlxGrid/codebase/excel/generate.php'" . ')">
<input type="button" name="printview" value="Printable View" onclick="mygrid.printView()">
</div>
<script>
var mygrid
mygrid = new dhtmlXGridObject('gridbox');
mygrid.setImagePath("/dhtmlx/dhtmlxGrid/codebase/imgs/");
mygrid.setHeader("Category,Type, Quote, Name,Rating,Keywords,Source,Notes,Sort Name");
mygrid.attachHeader("#connector_text_filter,#connector_text_filter,#connector_text_filter,#connector_text_filter,,#connector_text_filter,#connector_text_filter,,");
mygrid.setInitWidths("100,100,400,125,50,200,100,200,150");
mygrid.setColTypes("ed,coro,ed,ed,ed,ed,ed,ed,ed");
mygrid.setColAlign("center,center,center,center,center,center,center,center,center");
mygrid.setDateFormat("%m-%d-%Y");
mygrid.setColSorting("str,int,na,str,num,str,str,na,connector");
mygrid.enableSmartRendering(true,25);
mygrid.enableMultiselect(true);
mygrid.enableMultiline(true);
mygrid.enablePaging(true, 25, 10, "pagingArea", true);
mygrid.setSkin("dhx_blue");
mygrid.setPagingSkin("bricks","dhx_blue");
mygrid.init();
mygrid.loadXML("/quotes/connector_quotes.php");
mygrid.loadXML("/quotes/connector_quotes.php?connector=true&dhx_sort[8]=asc");
var dp = new dataProcessor("/quotes/connector_quotes.php");
dp.init(mygrid);
</script>
[/code]
My connector program is:
[code]<?php
require_once(“/home/sliwains/public_html/quotes/config.php”);
require(“/home/sliwains/public_html/dhtmlx/dhtmlxConnector/php/codebase/grid_connector.php”);
$res=mysql_connect($mysql_server,$mysql_user,$mysql_pass);
mysql_select_db($mysql_db);
$grid = new GridConnector($res);
$grid->dynamic_loading(200);
$grid->set_options("type",array("1" => "Wisdom", "2"=>"Wit","3" => "Humor","4" => "Classic", "5" => "Cliché","6" => "Parable", "7"=>"History","8" => "Info","9" => "Literary", "10" => "Religious" , "11" => "Malaprops"));
$grid->render_table("core1","id","category, type, quote, name, rating, keywords, source, notes, sort");
?>[/code]
For completeness, by config.php file is given by:
<?php
$mysql_server="localhost";
$mysql_user = "sliwains_root";
$mysql_pass = "***********";
$mysql_db = "sliwains_quotes";
?>