Open an empty gantt chart

Hi, in my web java application I need to create many projects so I need to open a new empty gantt everytime I want, the problem is that the table tasks contains other projects and if I want to create a new project the page will display all the old tasks, what can I do with this trick, please help.
index.html

[code]
<input type=“submit” value=’'gantt" >

[/code] newgantt.html [code]
gantt.config.xml_date = "%Y-%m-%d %H:%i"; gantt.config.scale_unit = "day"; gantt.config.duration_unit = "day"; gantt.config.date_scale = "%d"; gantt.init("gantt_here"); gantt.load("Conector"); var dp = new dataProcessor("Conector"); dp.init(gantt); [/code] Conector.java [code] @Override protected void configure(HttpServletRequest req, HttpServletResponse res) { Connection conn = null; try { Class.forName("com.mysql.jdbc.Driver").newInstance(); conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/test", "root", ""); } catch (Throwable e) { e.printStackTrace(); } JSONGanttConnector gantt = new JSONGanttConnector(conn, DBType.MySQL); gantt.servlet(req, res); gantt.mix("open", "1"); gantt.enable_order("sortorder"); gantt.render_links("gantt_links", "id", "source,target,type"); gantt.render_table("tasks", "id","text", "start_date,duration,progress,sortorder"); } [/code]

Hi,
did you implement loading tasks on project basis? I.e. loading single project with all it’s children.

If so, showing an empty gantt should not be an issue. Supposedly you provide a project id to the java connector and then do the filtering of the server. Empty gantt does not have a project id so the connector should return an empty dataset

Thank you for the reply, I used

method and it works very well :smiley: