Hi there,
I am working my way through the Tutorials of Gantt on docs.dhtmlx.com/gantt/desktop__how_to_start.html. But I can not bring it to work .
After Step 6, when I try to fill some Data into the MySQL Database, Firebug gives me the Error
âSyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
file:///S:/DHTMLX/Gantt/codebase/dhtmlxgantt.js
Line 4157â
For the HTML code, i have taken the 04_connector_json.html example, just adjusted the folders.
[code]
DB loading html, body{ height:100%; padding:0px; margin:0px; overflow: hidden;} gantt.config.xml_date = "%Y-%m-%d %H:%i:%s" gantt.init("gantt_here"); gantt.load("data.php"); var dp = new dataProcessor("samples/common/connector.php");
dp.init(gantt);
</script>
[/code]
In the data.php I have pasted the code from Step 6, so it should be ready to go.
[code]<?php
include (âcodebase/connector/gantt_connector.phpâ);
$res=mysql_connect(âlocalhostâ,ârootâ,ââ);
mysql_select_db(âganttâ);
$gantt = new JSONGanttConnector($res);
$gantt->render_links(âgantt_linksâ,âidâ,âsource,target,typeâ);
$gantt->render_table(
âgantt_tasksâ,
âidâ,
âstart_date,duration,text,progress,sortorder,parentâ
);
?>[/code]
In the MySQL Database, I have reconstructed the data from Step 4.
Table gantt_links:
Table gantt_tasks:
I would appreciate any help on this problem.
Greetings,
Thomas