locked
Navigation issue from one html page to another one RRS feed

  • Question

  • Hi ,

    I am working on sample app consisting of one winJS.UI.listview & binding data to that winJS.UI.listview using wcf service.

    Now on click of that listviewitem I am trying to navigate to another html page. I added WinJS.Navigation.Navigate in selection changed event code. Its not navigating.

    So I found in google WinJS.Navigation.Navigate itself wont work to navigate you need to add some more like:

     The below piece of code is working fine & navigating to another page. On click of back button its loading initial page. Since

    the below code contains this line WinJS.Utilities.empty(elem); its removing all elements & blank page is displaying on click of back button.

    WinJS.UI.Animation.exitPage(elem.children).then(

    function() {

                   WinJS.Utilities.empty(elem);

                WinJS.UI.Pages.render(e.detail.location, elem)

                    .then(

    function() {

                       

    if(e.detail.location == "/default.html") {

                        

                          document.getElementById(

    'samplelistview').style.visibility = "visible";

                           

    varstate = WinJS.Navigation.history.current;

                         }

                       

    returnWinJS.UI.Animation.enterPage(elem.children)

                    });

          

    Please let me know if anyone has ideas or faced the similar kind of issue & resolved.

    Thanks,

     


    Sravani

    Thursday, November 29, 2012 12:23 PM

Answers

All replies