JavaScript - writing html elements that don't show up?
<p>I'm trying to write some code in javascript that uses a user's cookies to display a box containing some information. The page opens with some boxes containing news articles from Google News RSS feeds. I'm using a 3rd party app for the RSS; the feed is included in the HTML code as such: <br/></p>

<pre><code>&lt;script language="JavaScript" src="http://www.feedroll.com/rssviewer/feed2js.php?src=http%3A%2F%2Fnews.google.com%2Fnews%3Fq%3Dbarack%2Bobama%26output%3Drss&amp;num=4&amp;date=y&amp;targ=y&amp;utf=y&amp;css=feed"  charset="UTF-8" type="text/javascript"&gt;&lt;/script&gt;
</code></pre>

<p>The user can move the boxes around, and I want to store the box locations using cookies so that if a user revisits the page, the boxes will be in the same location. However, when I try to load the page from the information in the cookies, the boxes are blank. This is an example of what my code looks like (RSS feed for news using keyword "Barack Obama"):</p>

<pre><code>// Render boxes into HTML
function renderItem(container) {
    var wrapper = document.getElementById(container);

    var div_box = document.createElement('div');

    var feed_url = 'http://www.feedroll.com/rssviewer/feed2js.php src=http%3A%2F%2Fnews.google.com%2Fnews%3Fq%3Dbarack%2Bobama%26output%3Drss&amp;num=4&amp;date=y&amp;targ=y&amp;utf=y&amp;css=feed';

    var div_box_feed = document.createElement('div');
    var feed_script = document.createElement('script');
    feed_script.setAttribute('language', 'JavaScript'); 
    feed_script.setAttribute('src', feed_url);
    feed_script.setAttribute('charset', 'UTF-8');
    feed_script.setAttribute('type', 'text/javascript');

    div_box_feed.appendChild(feed_script);
    div_box.appendChild(div_box_feed);

    wrapper.appendChild(div_box);
}
</code></pre>

<p>When the page loads, the box appears but the news articles from the RSS feed are not there and the box is empty. When I look at the source code, however, it is identical to the code of the initial boxes (which did display the news articles). </p>

<p>Does anybody know what's wrong?</p>

<p>Thanks!</p>
