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 6741437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:43:29+00:00 2026-05-26T11:43:29+00:00

Does anyone know what Javascript ( type: load ) means? I gather its an

  • 0

Does anyone know what Javascript ( type: load ) means? I gather its an event however it should be an object?

Any advice appreciated!

BREAK -> var data = new google.visualization.DataTable(jsonData.jsonObj);

Working with Google charts….

charts.js

(function($){
    
    
    var charts = {
        
        init: function(){
            
            this.services();
        },
        services: function(){
            var data = {
                uri : SITEURL + '/moduleTest/servicelist', //siteurl defined in index.php
                div : 'service-chart',
                title : 'Service List'
            }
            charts.ajaxCallback(data);
        },
        ajaxCallback : function(data){
            $.ajax({
               url : data.uri,
               type : 'POST',
               dataType : 'json',
               success : function(callback){

                   var jsonData = {
                       div : data.div,
                       jsonObj : callback,
                       title : data.title
                   }
                   drawCharts(jsonData);
                   
               }
            });
        }
        
    }
    
    $(function(){
       charts.init(); 
    });
    
})(jQuery);

google.load('visualization', '1.0', {'packages':['corechart']});

google.setOnLoadCallback(drawCharts);

function drawCharts(jsonData){
   
    var data = new google.visualization.DataTable(jsonData.jsonObj);//Break point ( type : load )
    
    var options = 
        {
             'title': jsonData.title,
             'width':250,
             'height':300
         };

  var chart = new google.visualization.PieChart(document.getElementById(jsonData.div));
  chart.draw(data, options);

}

Services.php ( function test )

 public function servicelist(){ //TEST data
        if($this->input->is_ajax_request()){
            echo "
                {
                     cols: [{id: 'task', label: 'Employee Name', type: 'string'},
                            {id: 'startDate', label: 'Start Date', type: 'date'}],
                     rows: [{c:[{v: 'Mike'}, {v: new Date(2008, 1, 28), f:'February 28, 2008'}]},
                            {c:[{v: 'Bob'}, {v: new Date(2007, 5, 1)}]},
                            {c:[{v: 'Alice'}, {v: new Date(2006, 7, 16)}]},
                            {c:[{v: 'Frank'}, {v: new Date(2007, 11, 28)}]},
                            {c:[{v: 'Floyd'}, {v: new Date(2005, 3, 13)}]},
                            {c:[{v: 'Fritz'}, {v: new Date(2011, 6, 1)}]}
                           ]
                   }

                ";
        }
    }

Ok I may not have made any sense with the question(it was 6am).

I am passing in a json object to the my google charts constructor ( drawCharts() ).

var jsonData =  {
                         cols: [{id: 'task', label: 'Employee Name', type: 'string'},
                                {id: 'startDate', label: 'Start Date', type: 'date'}],
                         rows: [{c:[{v: 'Mike'}, {v: new Date(2008, 1, 28), f:'February 28, 2008'}]},
                                {c:[{v: 'Bob'}, {v: new Date(2007, 5, 1)}]},
                                {c:[{v: 'Alice'}, {v: new Date(2006, 7, 16)}]},
                                {c:[{v: 'Frank'}, {v: new Date(2007, 11, 28)}]},
                                {c:[{v: 'Floyd'}, {v: new Date(2005, 3, 13)}]},
                                {c:[{v: 'Fritz'}, {v: new Date(2011, 6, 1)}]}
                               ]
                       }

    console.log(typeof jsonData) === object // Correct, what I expect!
    console.log(jsonData) === load // not what I expect, I expect json object
  • 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-05-26T11:43:30+00:00Added an answer on May 26, 2026 at 11:43 am

    It looks to me like this comment in the code:

    //Break point ( type : load )
    

    means to some agent (probably a debugger looking for certain comments) that there should be a breakpoint set here at page load time.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone know how to get the below to report a javascript error? (any
Does anyone know how to resize images proportionally using JavaScript? I have tried to
Does anyone know of a really good editor to debug JavaScript (other then Visual
Does anyone know how to set the working directory in JavaScript before? Code I
Does anyone here know of a Javascript application (something similar to Lightbox, only not
Does anyone know if there is a common javascript library to enable scrolling that
Does anyone know if it is possible with javascript to to tell the position
Does anyone know how to disable an ASP.NET validator using JavaScript? I'm using javascript
Does anyone know how I can take a MySQL datetime data type value, such
I'm not too great with javascript. Does anyone know how I can increase the

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.