pjamourik
Posts: 0
Joined: Mon May 26, 2014 12:22 pm

Don't reload page on window.history.back();

Hi Guys,

Another question I can't find an answer to :

I have a result page with a grid. Through a servcice the grid is populated when loading the page.

When i click one cell i want to show the details in another page.

In the other page I have the option to navigate "Back" (header button).

When I do this the original page is empty, or reloaded.

Is there a nice solutions that the page can be return to the situation when i clicked on the cell (so also the scroll-position is intact)?

Thanks in advance,

Peter

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Don't reload page on window.history.back();

Hi Peter,

Let me tell you how our events work.

We store two pages: your current page and the previous one. startScreen is loaded once - for the first time you open it.

If you fill the grid on Load event, it won't be filled again when you return to it.
If you go 'further' it will be reloaded when you return.

Slava Balabanov
Posts: 0
Joined: Thu Apr 17, 2014 4:35 pm

Don't reload page on window.history.back();

Hi. I was about to ask the same question as Peter.
What you are saying is not whats happening to me actually.

I have 3 pages. 1. login 2. a list that is being populated on page load 3. details page.

Once i'm in the second page and click on a list item, i go to the details page
(Now the second page - previous - should be stored right?).
I click the back header button and i go back to the second page with the list, and i see that the list populates again like the Load event was fired again (i've put console.log lines for verification).

So i dont see the store thing working. Anyway to check if i do something wrong or why doesnt it work?
Thanks!

obullei
Posts: 0
Joined: Thu Jun 05, 2014 12:17 am

Don't reload page on window.history.back();

Hello Peter!

We are working on it at the moment and will get back to you with update as soon as possible.

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Don't reload page on window.history.back();

Hi Slava,

Please try with "Render all pages in one HTML file (jQuery Mobile multi-page template)" checked in App settings.

Slava Balabanov
Posts: 0
Joined: Thu Apr 17, 2014 4:35 pm

Don't reload page on window.history.back();

Hi,
Thanks for this. but now when i click back and on another link the data doesnt refresh.
i mean, i have a list with different values in. When i click on an item i go to the details page. when i go back to the previous page i see that the list is not loaded again and all is good.
If i click on another list item, it moves to the details page but i see the details of the previous item - i guess that the load events dont fire here.
Should i use PageShow events instead of Load? or is there something more suitable?

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Don't reload page on window.history.back();

Hello Slava,

Yes, the load event now will be triggered only at the first time. You should use page show instead of the load.

Return to “Issues”