Disabling 'back'/'next' web browser button usage in application

2008-10-29 Thread Tomasz Dziurko
Hi.

I have application which consists of questions to user provided in
some order. Each question is reachable on the same address, let's say
http://myApp/Question. Application engine knows which question to show
from database record. Each question page has 'Previous Question' and
'Next Question' buttons which increase/decrease questionNumber in
database and redirects to http://myApp/Question (which loads question
looking for its number in database).

My problem is:
How disable 'back' and 'next' button in web browser so user can go
to previous/next question only by using 'Previous Question' / 'Next
Question' button? Is there a way to remove whole page from session? So
user when clicks back/next will see custom communicate your
session expired or you clicked 'back' or 'next' button on your web
browser while doing a test'. Or maybe I could achieve such
functionality in other way?

Thank you in advance for help

Regards
-- 
Tomasz Dziurko

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Disabling 'back'/'next' web browser button usage in application

2008-10-29 Thread Martin Grigorov
Hi Tomasz,

Recently I integrated a JavaScript library with Wicket that could help
you with this particular application.

Take a look at the code and examples:
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-jquery/src/main/java/org/wicketstuff/jquery/ajaxbackbutton

https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-jquery-examples/src/main/java/org/wicketstuff/jquery/ajaxbackbutton
 

The code is quite new and the example page is the only test for it, so
it could have some bugs ...

Try it and let me know whether it is in any help for you.

Martin 


On Wed, 2008-10-29 at 09:52 +0100, Tomasz Dziurko wrote:
 Hi.
 
 I have application which consists of questions to user provided in
 some order. Each question is reachable on the same address, let's say
 http://myApp/Question. Application engine knows which question to show
 from database record. Each question page has 'Previous Question' and
 'Next Question' buttons which increase/decrease questionNumber in
 database and redirects to http://myApp/Question (which loads question
 looking for its number in database).
 
 My problem is:
 How disable 'back' and 'next' button in web browser so user can go
 to previous/next question only by using 'Previous Question' / 'Next
 Question' button? Is there a way to remove whole page from session? So
 user when clicks back/next will see custom communicate your
 session expired or you clicked 'back' or 'next' button on your web
 browser while doing a test'. Or maybe I could achieve such
 functionality in other way?
 
 Thank you in advance for help
 
 Regards


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Disabling 'back'/'next' web browser button usage in application

2008-10-29 Thread Richard Allen
I think a better solution is to make the browser's back/forward buttons have
the same effect as clicking on the 'Previous Question'/'Next Question'
buttons. If you put effort into making that work instead of putting your
effort into trying to disable the browser's back/forward buttons, then you
will have a better application in the end -- one that the user's will
appreciate more.

On Wed, Oct 29, 2008 at 6:12 AM, Martin Grigorov [EMAIL PROTECTED]wrote:

 Hi Tomasz,

 Recently I integrated a JavaScript library with Wicket that could help
 you with this particular application.

 Take a look at the code and examples:

 https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-jquery/src/main/java/org/wicketstuff/jquery/ajaxbackbutton


 https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-jquery-examples/src/main/java/org/wicketstuff/jquery/ajaxbackbutton

 The code is quite new and the example page is the only test for it, so
 it could have some bugs ...

 Try it and let me know whether it is in any help for you.

 Martin


 On Wed, 2008-10-29 at 09:52 +0100, Tomasz Dziurko wrote:
  Hi.
 
  I have application which consists of questions to user provided in
  some order. Each question is reachable on the same address, let's say
  http://myApp/Question. Application engine knows which question to show
  from database record. Each question page has 'Previous Question' and
  'Next Question' buttons which increase/decrease questionNumber in
  database and redirects to http://myApp/Question (which loads question
  looking for its number in database).
 
  My problem is:
  How disable 'back' and 'next' button in web browser so user can go
  to previous/next question only by using 'Previous Question' / 'Next
  Question' button? Is there a way to remove whole page from session? So
  user when clicks back/next will see custom communicate your
  session expired or you clicked 'back' or 'next' button on your web
  browser while doing a test'. Or maybe I could achieve such
  functionality in other way?
 
  Thank you in advance for help
 
  Regards


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Disabling 'back'/'next' web browser button usage in application

2008-10-29 Thread Tomasz Dziurko
And any hint how to do this? :)

I thought about two possible ways to solve my problem:
1. on clicking Next/Prev Question button remove current page from
PageMap (although no idea how to do this yet ;) ) and then redirect
further, so when user use back button he will see session-expired-like
page
2. on clicking Next/Prev Question button invalidate Question and
answers model so (not sure, but think it works this way) when user
backs models will be loaded again.
What do you think?

Regards
-- 
Tomasz Dziurko

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Disabling 'back'/'next' web browser button usage in application

2008-10-29 Thread Martin Grigorov
it is too bad that there are no deployed examples of wicketstuff-jquery
project to see it in action.

What I've done is exactly this. 
With HistoryAjaxBehavior you could listen for clicks on back/forward
button.



On Wed, 2008-10-29 at 07:10 -0400, Richard Allen wrote:
 I think a better solution is to make the browser's back/forward buttons have
 the same effect as clicking on the 'Previous Question'/'Next Question'
 buttons. If you put effort into making that work instead of putting your
 effort into trying to disable the browser's back/forward buttons, then you
 will have a better application in the end -- one that the user's will
 appreciate more.
 
 On Wed, Oct 29, 2008 at 6:12 AM, Martin Grigorov [EMAIL PROTECTED]wrote:
 
  Hi Tomasz,
 
  Recently I integrated a JavaScript library with Wicket that could help
  you with this particular application.
 
  Take a look at the code and examples:
 
  https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-jquery/src/main/java/org/wicketstuff/jquery/ajaxbackbutton
 
 
  https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-jquery-examples/src/main/java/org/wicketstuff/jquery/ajaxbackbutton
 
  The code is quite new and the example page is the only test for it, so
  it could have some bugs ...
 
  Try it and let me know whether it is in any help for you.
 
  Martin
 
 
  On Wed, 2008-10-29 at 09:52 +0100, Tomasz Dziurko wrote:
   Hi.
  
   I have application which consists of questions to user provided in
   some order. Each question is reachable on the same address, let's say
   http://myApp/Question. Application engine knows which question to show
   from database record. Each question page has 'Previous Question' and
   'Next Question' buttons which increase/decrease questionNumber in
   database and redirects to http://myApp/Question (which loads question
   looking for its number in database).
  
   My problem is:
   How disable 'back' and 'next' button in web browser so user can go
   to previous/next question only by using 'Previous Question' / 'Next
   Question' button? Is there a way to remove whole page from session? So
   user when clicks back/next will see custom communicate your
   session expired or you clicked 'back' or 'next' button on your web
   browser while doing a test'. Or maybe I could achieve such
   functionality in other way?
  
   Thank you in advance for help
  
   Regards
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]