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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:45:23+00:00 2026-05-26T19:45:23+00:00

im using the google charts libaries , just testing the example code in my

  • 0

im using the google charts libaries, just testing the example code in my server everything goes well. BUT, if i put the code in one page, lets call it example.php, if i call example.php from another page using ajax, like:

    $.ajax({ url: 'stats-render.php', data: {ref: $(this).attr('id')}, type: 'post', success: function(d) {
        $('div.stats-data').html(d);
    }});
    $('div.stats-data').html('<center><img src="css/img/ajax-loader.gif" alt="loader_IMG" /><br>Rendering your stats</center>');
1000);
    });

It does work, obviously there is a problem when i call the example via ajax and not when i call it directly. Any ideas?

  • 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-26T19:45:24+00:00Added an answer on May 26, 2026 at 7:45 pm

    You should consider using an iframe to make it works, as the result of the google test page is a complete html page.

    Your code becomes :

    <html>
      <head>
        <title>test</title>
        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"/>
        <script type="text/javascript">
          $(function(){
             $('.stats-data').html('<center><img src="css/img/ajax-loader.gif" alt="loader_IMG" /><br>Rendering your stats</center>');
    
             $('.stats-data').attr('src', 'stats-render.php');
           });
        </script>
      </head>
      <body>
        <iframe width="600" height="600" class="stats-data">
          override me
        </iframe>
      </body>
    </html>
    

    It loads the content of the google cahrt in your page using an iframe.
    If you really wanted to use a div instead of an iframe, you should consider parsing the result of your ajax call and fill your div correctly.

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

Sidebar

Related Questions

We are using Google Charts for render the chart images, but 500 requests/day became
I've just started using google charts and want to use it in a small
I'm using a javascript library called flot (http://code.google.com/p/flot/) to render graphs and charts and
I'm busy using Google Charts in one of my projects to display data in
I'm using the Google charts API to generate a pie chart in my Rails
I am using Google motion-charts in a web-site developed in python/django. Is there a
I'm developing an application which draws some charts and I'm using Google Chart. After
When using Google Chrome, I want to debug some JavaScript code. How can I
Currently using Google Analytics as a supplement to our paid tracking software, but neither
I am using the Google charts API. Is there a way to hide 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.