I have a list view of countries, when I click at the item I want to get the detail in the other .js
How can i get the name and the details of the selected country my code is like this:
function loadData() {
var data = nomCountrydata.slice(currentListMarker, currentListMarker + maxFetchRows);
var listData = [];
var isPortrait = Titanium.Gesture.orientation == Titanium.UI.PORTRAIT || Titanium.Gesture.orientation == Titanium.UI.UPSIDE_PORTRAIT;
for(var i=0,j=data.length; i<j; i++){
listData.push({
nomCountry: { text : data[i].name, width: '50%' },
ImgCountry: { image : data[i].ImgCountry, width:'50%', visible: isPortrait }
});
};
currentListMarker += maxFetchRows;
nomCountrySection.appendItems(listData);
nomCountryList.setMarker({sectionIndex:0, itemIndex:nomCountrySection.items.length -1});
} nomCountryList.addEventListener('itemclick', function(e) {
var winn = Ti.UI.createWindow({
url:'CountryDetail.js',
row_title : e.itemIndex,
backgroundColor: '#f9f9f9',
title:'Detail Country'
});
winn.open();
});