Email Remember me
Password
Click here to register and learn more
Jobs Buzzes Answers Polls Projects Search Contact us Home

Help wanted


Expand your network

Harini R.
Harini R.

Tewksbury, MA

Recent buzz

Posting includes attached pictures Crystal Reports: 5 Tests for Top Performance

Posted in Computer & Web Programming

Do you know the answer?

I am doing web development. I have a page to do with credit card, which when user click "refresh...

Posted in Computer & Web Programming

Featured project

Global Zero

Posted in Government Relations

Messages :: netCenter :: Connections :: Pictures :: :: Find a job

Submit your answer or comment

Log in on top of the page or click here to register and answer this question.
Log in on top of the page or click here to register and submit your question.

Browse questions

Show all or browse by industry

Current question

Paul Harris User rating: Beginner (23)
Paul Harris

Answer this questionAdd to favouritesShare with a friendEmail to a friendFlag as spam or abuse
AnswerSaveShareEmailSpam

I am doing web development. I have a page to do with credit card, which when user click "refresh" or "Back", the transaction will be performed one more time, which is unwanted. This include Browser top left "Back" & "Refresh" button, "right click->Refresh/Back", press "F5" key. This is to be done on certain cgi page only, not all of them. Can this be done using Javascript? Or any other method?

Thanks

Posted in Computer & Web Programming

Answers (3)

Anonymous user
Anonymous user

Send kudosFlag as spam or abuse
KudosSpam
The standard way is to do it in 3 steps.

- the form page submits fields to processing page
- processing page processes data and redirects to result page
- result page just displays results, reloading it won't do any harm.

Agree with this answer?

67% of users agreed

Anonymous user
Anonymous user

Send kudosFlag as spam or abuse
KudosSpam
here's a solution to that:

The form page sets a session variable, for example session("fromformpage")=1
The processing page check the session variable, if its ="1" then process data and redirect to result page if any other than ="1" then just redirect to result page.
The result page sets the session variable to "".
Then if the user is pressing back button, the processing page will not do the process again, only redirect to process page.

Agree with this answer?

50% of users agreed

Anonymous user
Anonymous user

Send kudosFlag as spam or abuse
KudosSpam
The simple fact that resubmitting the form generates a duplicate transaction is worrying. You should have some sort of check to ensure each submit of form data is unique.

For example, the page which would submit the form should be given a unique ID that gets submitted with the form. The business logic should then be able to recognise that the form submitted has already been processed (as the (no longer) unique ID will be the same), so ignores the second attempt.

The 'standard way' still doesn't stop clients from clicking the back button twice... or even going back and resubmitting the form if they don't think (for whatever reason) it has been processed.

Agree with this answer?

50% of users agreed

See more questions and answers >>>




Employers :: RSS :: Blog :: Advertise :: Terms of use :: Privacy policy :: Mailing list :: Credits :: Jobs in the UK

Socializer StumbleUpon Technorati Digg Yahoo buzz Twitter FaceBook MySpace del.icio.us reddit ping.fm Mixx Furl Propeller Live Google Yahoo Blinklist Bluedot MaGnolia Blogmarks Simpy Squidoo

Dandy Project LLC 2010 DandyProject.com

Daily poll

If a job posting doesn't state a salary range, it's because they...
can pay anything
pay too little
are just not sure yet
want people interested in a job, not pay
don't have a real open position


or create your own poll.