Browser Back button event notification

Forum to discuss the Web client version of Servoy.

Browser Back button event notification

Postby rossent » Wed Sep 28, 2011 12:03 pm

Hi all,

Is there a way to add an event/callback notification which is invoked when users navigate to a "previous page" using the Back button of the browser? In ASP.NET 3.5 and later such mechanism is available.

The issue that we are facing is that our application uses just a single main form and displays the other forms in tabs so the browser Back button really messes up the state of the application. In other words, we do not expect the Back button to display the previous "page" automatically but rather fire an event/callback where we can update the UI state accordingly.

Unfortunately sometimes users invoke the browser "back" functionality accidentally (for example, by using the Backspace key while not in an editable field) and we really need a way to handle these cases in the Web Client.
Any suggestion on what can be done are more than welcome.
Rossen Totev
Argos Software
rossent
 
Posts: 288
Joined: Wed Dec 31, 2008 2:03 pm

Re: Browser Back button event notification

Postby jcompagner » Thu Sep 29, 2011 11:52 am

But if you just use 1 main method, and you just switch tabs, the url shouldn't really change so there is no back page. (there is only 1 page)

But there is no such handle in servoy, back button is handled by the wicket framework.

Maybe you can search for solutions on the web (onbeforeunload or something) and inject some javascript?
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8828
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet


Return to Servoy Web Client

Who is online

Users browsing this forum: Bing [Bot] and 7 guests

cron