How do I pass variables from one page to another?
I am trying to pass a variable from one page to another. Basically I have a tableview that calls a page. My question is how can I pass a variable from page 1 to page 2? And how do I reference it on page 2?
I'm use to passing variables in php, just not sure how to do it here.
I know this isn't correct, but this is what I'm use to.
abc1.js?name=value
2 Answers
-
When creating the new view/window you can set custom properties on it like this:
ssessionDetailsWin = Titanium.UI.createWindow({
url: theURL,
title:'Session Details',
backgroundColor:'#fff',
barColor:'#10372e',
backButtonTitle:'Back'
});
sessionDetailsWin.sessionID = e.rowData.sessionID;then in the new window you can get the passed value like this:
var sSurveyID = win.sessionID; -
Thanks Chris. I'm trying to pass a RSS feed url. Will your way accomplish this?