How to stop a page from reloading

  • Thread starter Thread starter bthumber
  • Start date Start date
B

bthumber

In my application when a user comes to the last page his information is
inserted in the database. If the user navigates away from the page, no
problem. If the user navigates back to the final page it causes another
insert operation.

How can I prevent the page from reloading? I though about disabling the
back button but that not good for the hold application.
 
Would that session be in a "if statement" else do something else?

Brent

Its better to use cookie or session, you might hit the same problem
with fwd button.

Cheers,
-Ratnesh
S7 Software
 
Hi,

Reading your post I assume the insertion of the record takes place in
the load event of the page???

Isn't a more common scenario that the insertion of a record takes place
when the user clicks on a button, like 'Save' or 'OK'?

That way, there is no issue when the user navigates back (or forward) to
the same page again. After saving, you could also clear all the fields
and navigate to another page. When the user navigates back, all fields
are cleared so when he/she clicks the save-button again, the data does
not validate (assuming you validate the data before saving it) and won't
be saved.

Greetings,
Chris
 
I though of that, but that's not the way it designed, so I'm just working to
stop the extra insert issue.

Brent
 
I though of that, but that's not the way it designed, so I'm just working to
stop the extra insert issue.

Brent
 
Back
Top