Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8231881
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T17:38:33+00:00 2026-06-07T17:38:33+00:00

I am trying to reload (via ajax) data into a Gantt chart using php

  • 0

I am trying to reload (via ajax) data into a Gantt chart using php and jquery. I can draw a gantt chart with my data on the initial load without any issues. I have a ajax save call to update chart data in which I would like to redraw the gantt chart after a successful save.

I am able to load part of the data, ie the title data on the left, but not the dates, I believe it is not in the right format? I am using this gantt chart plugin from github: https://github.com/thegrubbsian/jquery.ganttView

Below is a sample of the data they are using? Is this json data?

I am not sure? How do I format my output to mirror and use this data.

var ganttData = [
{
    id: 1, name: "Feature 1", series: [
        { name: "Planned", start: new Date(2010,00,01), end: new Date(2010,00,03) },
        { name: "Actual", start: new Date(2010,00,02), end: new Date(2010,00,05), color: "#f0f0f0" }
    ]
}, 
{
    id: 2, name: "Feature 2", series: [
        { name: "Planned", start: new Date(2010,00,05), end: new Date(2010,00,20) },
        { name: "Actual", start: new Date(2010,00,06), end: new Date(2010,00,17), color: "#f0f0f0" },
        { name: "Projected", start: new Date(2010,00,06), end: new Date(2010,00,17), color: "#e0e0e0" }
    ]
}, 

My code looks like this:

[{"id":0,"name":"task number 20","series":[{"name":"Bob","start":"new Date(2012,2,19)","end":"new Date(2012,6,11)"}]},{"id":1,"name":"another new posts","series":[{"name":"Bill","start":"new Date(2012,5,22)","end":"new Date(2012,6,27)"}]},here
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T17:38:34+00:00Added an answer on June 7, 2026 at 5:38 pm

    It’s not legal to “call” functions (including constructors) from a json string. JSON isn’t anything you can pass to an eval function : http://www.json.org/

    You should do the transformation from string to date in your javascript code.

    You can send

    [{..."start":"Thu Jul 12 2012 16:20:17 GMT+0200 (CEST)"...}]
    

    and in your js code, just after json parsing, iterate over the objects to do

    myobj.start = new Date(myobj.start);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am running into a problem trying to use AJAX and jQuery with ASP.NET
I'm using jquery.mobile-1.0.1. I'm trying to make the page reload when clicking on the
I am trying to reload the fresh posts using jQuery. As far as I
I am basically trying to reload the UITableView data using blocks when the data
I'm using PHP and I'm trying to keep an array of the last 10
I'm trying to figure out why this is a problem when using jQuery 1.4.2
I'm trying to save simple text data in my app using this code from
I am trying to save the OrderedDictionary into the session and reload it. basically,
I am implementing caching into my Rails project via Memcached and particularly trying to
I'm trying to reload a table which was also generated by PHP. The table

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.