How to pass value while opening a setting flyout RRS feed

  • Question


    I want to open a setting flyout, and pass some data to the flyout, like "username=test".

    Open flyout:

    WinJS.UI.SettingsFlyout.showSettings("login", "/pages/login.html");

    Who can tell me how to do it?

    Monday, April 15, 2013 9:56 AM


All replies

  • Not really sure if I am fully understanding what you want to do - but one simple way may be to use local storage. Save the value in yur calling process and retrieve it in the flyout.
    Monday, April 15, 2013 11:40 AM
  • Hello,

    You can define a variable in your main page and then access it on the settings page. If you have application level data, you can just tack some state onto the app object. What I do is move the var app = WinJS.Application line that is in the default.js by default into global scope so I can access it from anywhere,

    I would like to suggest you check the solutionfor the similar issue in the following link


    Hope this helps, thanks.

    Yanping Wang
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, April 16, 2013 7:07 AM