locked
How can I refresh a page of my app by code RRS feed

  • Question

  • Hi

    Is there a way to refresh the current page of your metro style app? Some pages of my application have a refresh button, and other pages shouldn't have a refresh button. However, I need to refresh my pages in my code when some functions are invoked.

    Thank you.

    Monday, April 16, 2012 12:34 PM

Answers

  • Hi HS,

    When you change the HTML in your Javascript it will update (just like normal javascript/HTML dom interactions work).  There is no need to refresh the page, simply update the elements your are changing.

    -Jeff


    Jeff Sanders (MSFT)

    Tuesday, April 17, 2012 2:09 PM
    Moderator

All replies

  • Hi HS,

    When you change the HTML in your Javascript it will update (just like normal javascript/HTML dom interactions work).  There is no need to refresh the page, simply update the elements your are changing.

    -Jeff


    Jeff Sanders (MSFT)

    Tuesday, April 17, 2012 2:09 PM
    Moderator
  • Hi HS,

    When you change the HTML in your Javascript it will update (just like normal javascript/HTML dom interactions work).  There is no need to refresh the page, simply update the elements your are changing.

    -Jeff


    Jeff Sanders (MSFT)

    Hi

    I thought so, but the problem is that when I change my view from full to snapped, in some cases the content of the page disappears. And when I refresh the page afterwards, the content comes back. This is because de data is then retrieved from the server. So what I want is to refresh the application's page every time when I move to the snapped view.

    Wednesday, April 25, 2012 9:12 AM
  • What content does not refresh?  Have you narrowed down the issue to a particular control or element?

    Jeff Sanders (MSFT)

    Wednesday, April 25, 2012 12:15 PM
    Moderator
  • What content does not refresh?  Have you narrowed down the issue to a particular control or element?

    Jeff Sanders (MSFT)

    Yes, It's an element with an id named "content".

    Thursday, April 26, 2012 7:30 AM
  • What is the type of the element?

    Jeff Sanders (MSFT)

    Thursday, April 26, 2012 12:06 PM
    Moderator
  • What is the type of the element?

    Jeff Sanders (MSFT)

    Hi, i changed the attribute, and then the HTML and it is now updating. 

    Thank you!

    Monday, April 30, 2012 8:36 AM