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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T23:30:08+00:00 2026-06-06T23:30:08+00:00

This Google jQuery GeoChart plugin works great like this: <script type=’text/javascript’ src=’https://www.google.com/jsapi’></script> <script type=’text/javascript’>

  • 0

This Google jQuery GeoChart plugin works great like this:

<script type='text/javascript' src='https://www.google.com/jsapi'></script>
<script type='text/javascript'>
     google.load('visualization', '1', {'packages': ['geochart']});
     google.setOnLoadCallback(drawRegionsMap);

      function drawRegionsMap() {
        // code to draw map
      };

</script>

But moving the code into classes, breaks everything. Browser is blank and status remains “transferring data from http://www.google.com.&#8221;

(function( someClass, undefined ) {
    someClass.init= function() {
       console.log(google); //google object defined but next line breaks:
       google.load('visualization', '1', {'packages': ['geochart']}); 

       ...remainder of code
    };
}( window.Project.Pages.someClass = window.Project.Pages.someClass || {}));

Any ideas as to why?

  • 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-06T23:30:10+00:00Added an answer on June 6, 2026 at 11:30 pm

    The problem is caused by the way how Google loads their scripts. A simplified version of the problem occurred in this question: The problem was caused by the fact that the load of a Google script was delayed.

    I’ve previously written a patch which is supposed to fix the issue, see this answer. Just evaluate the patch before using google.load.

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

Sidebar

Related Questions

This is how I load jQuery: <script src=http://www.google.com/jsapi></script> <script type=text/javascript> function OnLoad() { insert
This works: <script src=http://code.jquery.com/jquery-1.5.min.js type=text/javascript></script> <script src=http://code.jquery.com/mobile/1.0a3/jquery.mobile-1.0a3.min.js type=text/javascript></script> But I prefer the syntax: <script
I've been using Google Jsapi like so: <script type=text/javascript src=http://www.google.com/jsapi></script> <script type=text/javascript> google.load(jquery, 1.3);
I have this code <script type=text/javascript src=http://www.google.com/jsapi></script> <script type=text/javascript> google.load(maps, 3, {other_params:sensor=false}); google.load(jquery, 1.3.2);
I understand that if I use this: <script src=http://www.google.com/jsapi></script> <script type=text/javascript> google.load(jquery, 1); google.load(jqueryui,
<script src=http://www.google.com/jsapi></script> <script> google.load(jquery, 1.4.0); </script> <script type=text/javascript> $(function() { $('input[type=button]').click(function () { var
Google allows you to load jQuery asynchronously like so: <script src=http://www.google.com/jsapi?key=... type=text/javascript></script> <script> //<![CDATA[
I have this java code: <script src=http://www.google.com/jsapi></script> <script type=text/javascript> google.load(jquery, 1.2.6); $(a#more).click(function() { $(#info_box).show(blind,
During development, I use this to load the latest jQuery: <script src=http://www.google.com/jsapi></script> <script type=text/javascript>
HTML: <script src=http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js type=text/javascript></script> <script src=/js/grabber.js type=text/javascript></script> <script type=text/javascript> $(document).ready(function() { $('#search-js').submit(function() { var

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.