471,887 Members | 1,546 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,887 software developers and data experts.

jquery return false problem

pradeepjain
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. });
  8.  
  9. }
  10. </script>
  11.  
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 4263
acoder
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
pradeepjain
563 512MB
Yeah i was using it. but jconfirm provided a styled pop up window..
Apr 29 '10 #3
acoder
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
reply views Thread by YellowAndGreen | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.