I'm trying to pass two variables from one page to the next. How would I go about doing this?
Put this code in first page:
WinJS.Navigation.navigate("/pages/secondpage.html", yourvalue);
Then in second page to retrive the data use:
ready: function (element, options) {
//your data yourvalue is inside options parametr
}
Very good example about navigation
WinJS navigation example
WinJS navigation example 2
Just wanted to include an example of passing multiple values as Norbert answered in his comment.
WinJS.Navigation.navigate("/pages/page2/page2.html", {value1:"hello",value2:"world"}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With