Quantcast
Viewing all articles
Browse latest Browse all 8223

Getting values from main form into an IFrame web resource

I'm trying to learn to use web resources and graphs. I created a HTML web resource that has Google graphs in the code, placed in a form. It's a simple chart, but I want to get the values from the main form and pass them to the HTML page as variables, can this be done or am I wasting my time: The code is below:

<!--
You are free to copy and use this sample in accordance with the terms of the
Apache license (http://www.apache.org/licenses/LICENSE-2.0.html)
--><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="content-type" content="text/html; charset=utf-8"/><title>
      Google Visualization API Sample</title><script type="text/javascript" src="http://www.google.com/jsapi"></script><script type="text/javascript">
      google.load('visualization', '1', {packages: ['corechart']});</script><script type="text/javascript">
      function drawVisualization() {
        // Create and populate the data table.
        var data = google.visualization.arrayToDataTable([
          ['Task', 'Hours per Day'],
          ['Work', 11],
          ['Eat', 2],
          ['Commute', 2],
          ['Watch TV', 2],
          ['Sleep', 7]
        ]);
        // Create and draw the visualization.
        new google.visualization.PieChart(document.getElementById('visualization')).
            draw(data, {title:"So, how was your day?"});
      }

      google.setOnLoadCallback(drawVisualization);
    </script></head><body style="font-family: Arial;border: 0 none;"><div id="visualization" style="width: 600px; height: 400px;"></div></body></html>
​



Viewing all articles
Browse latest Browse all 8223

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>