title: multiple onload error in HTML
body: <p>HTML:-</p>
  
  <p>In the body tag I have used <code>onload="variable2.init() ; variable1.init();"</code>.</p>
  
  <p>JavaScript:-</p>
  
  <pre><code>var variable1 = {
  rssUrl: 'http://feeds.feedburner.com/football-italia/pAjS',
  
  init: function() {
      this.getRSS();
  },
  
  getRSS: function() {
      jQuery.getFeed({
          url: variable1.rssUrl,
          success: function showFeed(feed) {
              variable1.parseRSS(feed);
          }
      });
  },
  
  parseRSS: function(feed) {
      var main = '';
      var posts = '';
      var className = 'even';
      var pst = {};
      for (i = 0; i &lt; feed.items.length; i++) {
          pst = variable1.parsefootballitaliaRSS(feed.items[i]);
          if (className == 'odd') {
              className = 'even';
          }
          else {
              className = 'odd';
          }
          var shorter = pst.story.replace(/&lt;(?:.|\n)*?&gt;/gm, '');
          item_date = new Date(feed.items[i].updated);
          main += '&lt;div id="content1" class="post-main ' + className + '" onclick="mwl.setGroupTarget(\'#screens1\', \'#blog_posts1\', \'ui-show\', \'ui-hide\');mwl.setGroupTarget(\'#blog_posts1\', \'#post' + (i+1) + '\', \'ui-show\', \'ui-hide\');"&gt;';
          main += '&lt;b&gt;' + pst.title.trunc(55, true) + '&lt;/b&gt;&lt;br /&gt;' + shorter.trunc(30, true);
          main += '&lt;div class="datetime"&gt;' + item_date.getDateTime() + '&lt;/div&gt;&lt;/div&gt;';
  
          posts += '&lt;div class="post-wrapper ui-hide" id="post' + (i+1) + '"&gt;';
          posts += '&lt;div class="post-title"&gt;&lt;b&gt;' + pst.title + '&lt;/b&gt;&lt;/div&gt;';
          posts += feed.items[i].description;
          posts += '&lt;/div&gt;';
      }
  
      jQuery('#main_screen1').html(main);
      jQuery('#blog_posts1').html(posts);
  
  },
  
  parsefootballitaliaRSS: function(item) {
      var match = item.description.match('src="([^"]+)"');
      var part = item.description.split('&lt;font size="-1"&gt;');
      var arr = {
          title: item.title,
          link: item.link,
          image: match,
          site_title: item.title,
          story: item.description
      };
  
      return arr;
  }
  };
  
  var variable2 = {
      weatherRSS: 'http://feeds.feedburner.com/go/ELkW',
  
      init: function() {
          this.getWeatherRSS();
      },
  
      getWeatherRSS: function() {
          jQuery.getFeed({
              url: variable2.weatherRSS,
              success: function showFeed(feed) {
                  variable2.parseWeather(feed);
              }
          });
      },
  
      parseWeather: function(feed) {
          var main = '';
          var posts = '';
          var className = 'even';
          var pst = {};
          for (i = 0; i &lt; feed.items.length; i++) {
              pst = variable2.parsegoRSS(feed.items[i]);
              if (className == 'odd') {
                  className = 'even';
              }
              else {
                  className = 'odd';
              }
              var shorter = pst.story.replace(/&lt;(?:.|\n)*?&gt;/gm, '');
              item_date = new Date(feed.items[i].updated);
              main += '&lt;div id="content2" class="post-main ' + className + '" onclick="mwl.setGroupTarget(\'#screens2\', \'#blog_posts2\', \'ui-show\', \'ui-hide\');mwl.setGroupTarget(\'#blog_posts2\', \'#post' + (i+1) + '\', \'ui-show\', \'ui-hide\');"&gt;';
              main += '&lt;b&gt;' + pst.title.trunc(55, true) + '&lt;/b&gt;&lt;br /&gt;' + shorter.trunc(30, true);
              main += '&lt;div class="datetime"&gt;' + item_date.getDateTime() + '&lt;/div&gt;&lt;/div&gt;';
  
              posts += '&lt;div class="post-wrapper ui-hide" id="post' + (i+1) + '"&gt;';
              posts += '&lt;div class="post-title"&gt;&lt;b&gt;' + pst.title + '&lt;/b&gt;&lt;/div&gt;';
              posts += feed.items[i].description;
              posts += '&lt;/div&gt;';
          }
  
          jQuery('#main_screen2').html(main);
          jQuery('#blog_posts2').html(posts);
  
      },
  
      parsegoRSS: function(item) {
          var match = item.description.match('src="([^"]+)"');
          var part = item.description.split('&lt;font size="-1"&gt;');
          var arr = {
              title: item.title,
              link: item.link,
              image: match,
              site_title: item.title,
              story: item.description
          };
  
          return arr;
      }
  };
  </code></pre>
  
  <p>When I run the program it only reads one of the variables i.e. either 1 or 2.<br>
  How can I correct them to read both the variables?</p>