...

View Full Version : How to handle browser 'BACK' button ?



tspraveena
04-29-2008, 06:23 AM
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.

abduraooft
04-29-2008, 10:40 AM
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.

tspraveena
04-29-2008, 11:41 AM
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.

fside
04-29-2008, 05:11 PM
> I have a issue in firefox <

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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum