Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Apr 2008
    Posts
    25
    Thanks
    9
    Thanked 0 Times in 0 Posts

    How to handle browser 'BACK' button ?

    Hi,
    I have a issue in firefox . This is fine in IE..

    There is a form in page where user can add/edit/delete the user details like name, username, password etc.
    And in the same page somewhere i am showing the list of the usernames in a multple select box, which were added.

    While adding the form i am checking the username availability. It should be unique across the system.

    My problem, when i load the page first time in Firefox, it shows fine and it shows the added usernames in a multipie select box and allows the admin to add the new user. When admin added one record successully, i am pressing browser button 'BACK'. Now there will be some entries in the text box and the multiple select box is not showing the recent added user.
    When i am pressing the save button, It is saying this username is not available but it is not showing in the multiple select box.

    If i refresh the page, it is ok. The recent added also will be shown.

    In IE when i press back button, It will show the recent username also, even without refresh also.
    I need similar functionality in firefox also.

    Any idea?
    Any help would be very much appreaciated.

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,861
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    How about showing a link to the original page saying "BACK" rather than using the browser's back button.
    Or how about posting the data to the same page and execute the DB operations at the top. Then show a message at the top, in case of a new entry, along with the form.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    New Coder
    Join Date
    Apr 2008
    Posts
    25
    Thanks
    9
    Thanked 0 Times in 0 Posts
    The link 'back' is already i provided.
    But this is requirement from our tester. he wants me to work on this issue.
    he will intentionally will click on browser 'BACK' button instead on the link what i provided.

    My tester wants this functionality.

    Is there any way to find out the back button event in javascript.?
    So that if i can reload the page if back button is pressed.

  • #4
    Regular Coder
    Join Date
    Mar 2008
    Posts
    301
    Thanks
    2
    Thanked 30 Times in 30 Posts
    > I have a issue in firefox <

    But you don't have an "issue" posting this to the wrong forum?


  •  

    LinkBacks (?)


    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •