title: Commonjs - Moving data from one window to another using Titanium in Appcelerator
body: <p>I'm trying to pass data from a main window when a button is pressed on that page using <code>require()</code>, like so:</p>
  
  <pre><code>mapview.addEventListener('click', function(evt) {
      var detailWindow = Ti.UI.createWindow({
              backgroundColor: '#333333',
              navTintColor: '#FFF',
              barColor: '#222222',
              itemID: evt.annotation.myid
          });
          Ti.API.info('detailWindow.itemID = ' + detailWindow.itemID); 
          // displays expected value from database eg 12345
  
          detailWindow = require('ui/iphone/detail');
          var detailWin = new myWindowHere(detailWindow.itemID);
  }
  </code></pre>
  
  <p>In detail.js:</p>
  
  <pre><code>function myWindowHere(myItemID) {
      var myDetailsWin = Titanium.UI.createWindow({
      //properties here
      });
      Ti.API.info('myItemID = ' + myItemID); // this log is never 
      var facilityID = myItemID;
  
      myWindowHere.open();
  
      return myDetailsWin;
  };
  module.exports = myWindowHere;  
  </code></pre>
  
  <p>But, I've gone wrong somewhere as I'm getting error message: <code>Can't find variable: myItemID</code></p>
  
  <p>Please help! Many thanks</p>