Posted By

davaodude on 03/29/07


Tagged

form submit


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

vali29


Confirm Submit


 / Published in: JavaScript
 

Simple popup confirmation before submitting a form.

  1. function confirmSubmit() {
  2. input_box=confirm("Are you sure you want to continue? Click OK to continue, or Cancel to stop");
  3. if (input_box==true) {
  4. document.getElementById('likeaction').value='doit';
  5. document.getElementById('mainform').submit();
  6. } else {
  7. return false;
  8. }
  9. }

Report this snippet  

You need to login to post a comment.