How to stop a page from reloading

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.
 
R

Ratnesh Maurya

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
 
C

Chris Zopers

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
 
B

bthumber

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

Brent
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top