469,330 Members | 1,199 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,330 developers. It's quick & easy.

jquery return false problem

563 512MB
Expand|Select|Wrap|Line Numbers
  1. <script LANGUAGE="JavaScript">
  2. function confirmSubmit()
  3. {
  4. jConfirm('Is the Appointment Confirmed?', 'Confirmation Dialog', function(r) {
  5. if(r){return true;}
  6. else {return false;}
  7. });
  9. }
  10. </script>
whjen i submit the foem i call this function and use jConfirm from jquery. i print r .its printing properly like true and false.but return false or return true has no effects.it just shows ths pop up and submits the form,does not wait for confirmation. how to solve this?
Apr 7 '10 #1
3 4228
16,027 Expert Mod 8TB
Can you not just use:
Expand|Select|Wrap|Line Numbers
  1. return confirm('Is the Appointment Confirmed?');
Apr 29 '10 #2
563 512MB
Yeah i was using it. but jconfirm provided a styled pop up window..
Apr 29 '10 #3
16,027 Expert Mod 8TB
You'll have to submit the form manually because you're in the inner function, e.g.
Expand|Select|Wrap|Line Numbers
  1. if (r) document.getElementById("formID").submit();
Apr 29 '10 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Colin Hale | last post: by
8 posts views Thread by Peter Afonin | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by Purva khokhar | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.