0

HI i have a ExtJS code on the front end. the drop downs on this page are loaded dynamically thru web-service call to 3rd party service. i have navigated from this page to the results page.

Now in results page i have a button which allows the user to go back to previous page. but all the data in the drop down should be retained.

i tried window.history.go(-1) and history.back()

Guys please help me.

Punith Raj
  • 2,164
  • 3
  • 27
  • 45

2 Answers2

0

If the navigation page is under different url than result page then it's not possible. You probably should save state of that menu for example in cookies, or in session on server so you could restore that state for each client. Also HTML5 client-side storage is an option. Another possibility is to change the way result page loads, so you won't need reload page to go back (for example use AJAX).

Krzysztof
  • 15,900
  • 2
  • 46
  • 76
  • Hi thanks for your answer.. the each of the dropdowns in the page are dependent on each other and probably i need the save the state in session so that i do not end up making the service call again. But i was just figuring if there was a way just to do a back and land in the previus page with alll the data in place. anyways i shal try that out with session. incase u find a solution for a simple html back kndly let me know. Thanks A lot :) – Punith Raj Jan 16 '12 at 18:12
0

I am using now extjs4 mvc design. We have a single html page, multiple views, a model and a controller.

On navigating to a new view, you need to hide the previous panels and when going back show the previous panel. This solved my problem of navigating and retaining view.

As above this is not suitable for mvc if you use it for multiple apps and older design where we use onReady().

Matt Fenwick
  • 48,199
  • 22
  • 128
  • 192
Punith Raj
  • 2,164
  • 3
  • 27
  • 45