Need To Submit Form If Users Hits Back Button or Leaves Page

I have a membership site where after a user submits their credit card information, we take them to an upsell page where they click Yes or No to the upsell and then their credit card is charged on the thank you page.

We're having a problem where a small amount of leave will leave on the upset page and therefore, their order is not completed.

We need a way using javascript or ajax to have it SUBMIT THE FORM if they try to leave the page by closing the browser or hitting the back button.

Is this possible to do?

PLEASE NOTE: WE DO NOT WANT TO DO THE SIMPLE OK/CANCEL javascript if they leave the page, we want something that will SUBMIT THE FORM instantly when they try to leave.

I'm not sure if this would need to be AJAX or Javascript, but we are open to any ideas.. Thanks!

Beceriler: AJAX, Javascript

Daha fazlasını gör: javascript credit card, c# submit, charged to, submit form user leaves page, submit form user leave page, to submit, thank you page, need to, leaves, HITS, need button, simple form javascript, button javascript, simple form ajax, simple ajax order form, simple ajax page, form submit page, submit site site, ajax button click, javascript click page, need browser, form card, thank form, simple order form ajax, small ajax form

İşveren Hakkında:
( 16 değerlendirme ) Austin, United States

Proje NO: #699446



Ready to do right now, Please check my PM Thanks

%selectedBids___i_period_sub_7% gün içinde 40%project_currencyDetails_sign_sub_9% %project_currencyDetails_code_sub_10%
(9 Değerlendirme)

4 freelancers are bidding on average $35 for this job


Hi there, I've got some ideas, check PM.

in %bids___i_period_sub_35% gün içinde30%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(17 Değerlendirme)

can do it. check pm thanks

in %bids___i_period_sub_35% gün içinde40%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(3 Değerlendirme)

Hi, I checked your project and find it really interested. All features are possible and not a problem. Also some of additional are to be proposed upon on continued conversation. If you are interested and bid amount is Daha Fazla

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(0 Değerlendirme)