Controlling the back button

5 posts, 0 answers
  1. Sébastien Richer
    Sébastien Richer avatar
    66 posts
    Member since:
    Sep 2006

    Posted 14 Dec 2006 Link to this post

    Hello,

    Please don't assassinate me :-)

    I want to control my user's back button. I want that when he enters a specific page, I set the previous page to something I want.

    This is not to annoy the user ;-) It is because I use RadWindow and usability problems have risen with that usage.

    I think I'll post in the RadWindow forum also.

    Thanks, cheers !
    Sébastien Richer
  2. Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 22 Dec 2006 Link to this post

    Hello Sebastien,

    You can handle the backspace key using the onkeydown client-side event and to redirect a user to another page using

    location.href = "my_new_page.html"

    Regards,
    Valentin.Stoychev
    the telerik team
  3. Stuart Hemming
    Stuart Hemming avatar
    1622 posts
    Member since:
    Jul 2004

    Posted 05 Mar 2007 Link to this post

    Does that work in all browsers?

    I only ask 'cos I regularly visit a page that traps 'shortcuts' in IE very well, but they claim not to be able to do the same thing for FF.

    --
    Stuart
  4. Stuart Hemming
    Stuart Hemming avatar
    1622 posts
    Member since:
    Jul 2004

    Posted 05 Mar 2007 Link to this post

    Sébastien,

    you need to be really sure of your audience; I don;t know why but start messing with the back button and once mild-mannered users will turn in to rabid, hate-filled psychopaths.

    I'm not saying don't to it, just be careful if you do and make sure you don properly rated flameproof clothing before you release it.

    --
    Stuart
  5. Kevin
    Kevin avatar
    549 posts
    Member since:
    Nov 2006

    Posted 06 Mar 2007 Link to this post

    I believe in a radWindow scenario, the approach suggested by telerik would do. You can see  variations of this for example:

    javascript:history.go(-1)

    however this has its share of issues too. And when it comes to AJAX updates, making back button work is a major, major pain which requires all sorts of hacks.
Back to Top