Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Jake, offhand it looks like you're putting '&lt;br&gt;' tags into your js code. 'datamade' could be:</p> <p><code>data.setCell('foo', 0, 'bar');&lt;br&gt;data.setCell('foo', 0, 'bar');</code></p> <p>This is not executable js because html tags aren't read by a js interpreter. You'd effectively be writing an incomplete comparison expression (nothing is less than a variable called br). Don't bother trying to insert the page breaks into your code, and just join on an empty string.<code>datamade = ''.join(datamake)</code></p> <p>Edit: In general though, it's not good practice to use a loop to print out 100+ lines of js. You're better off sending the whole object to js in json format and looping over it afterward in the client.</p> <p>I'd advise this:</p> <pre><code>&lt;link rel="stylesheet" type="text/css" href="http://visapi-gadgets.googlecode.com/svn/trunk/wordcloud/wc.css"/&gt; &lt;script type="text/javascript" src="http://visapi-gadgets.googlecode.com/svn/trunk/wordcloud/wc.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="http://www.google.com/jsapi"&gt;&lt;/script&gt; &lt;div id="wcdiv"&gt;&lt;/div&gt; &lt;script type="text/javascript"&gt; google.load("visualization", "1"); google.setOnLoadCallback(draw); function draw() { var data = new google.visualization.DataTable(); data.addColumn('string', 'Text1'); data.addRows(160); var tweets = {{tweets}}; for (var i in tweets) { data.setCell(i, 0, tweets[i]); } var outputDiv = document.getElementById('wcdiv'); var wc = new WordCloud(outputDiv); wc.draw(data, null); } &lt;/script&gt; </code></pre> <p>And have you server file show the following:</p> <pre><code>tweets1 = [] fetched = urlfetch.fetch("http://api.twitter.com/1/statuses/user_timeline.json?screen_name="+tweets.username+"&amp;count=200") statustext = json.loads(fetched.content) for tweetInfo in statustext: tweets1.append(tweetInfo["text"]) tweetsJson = json.dumps(tweets1) content_values = { 'tweets':tweetsJson, 'username':tweets.username, } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload