jquery return false problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pradeepjain
    Contributor
    • Jul 2007
    • 563

    jquery return false problem

    Code:
    <script LANGUAGE="JavaScript">
    function confirmSubmit()
    {
    jConfirm('Is the Appointment Confirmed?', 'Confirmation Dialog', function(r) {
    if(r){return true;}
    else {return false;}
    });
    
    }
    </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?
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    Can you not just use:
    Code:
    return confirm('Is the Appointment Confirmed?');

    Comment

    • pradeepjain
      Contributor
      • Jul 2007
      • 563

      #3
      Yeah i was using it. but jconfirm provided a styled pop up window..

      Comment

      • acoder
        Recognized Expert MVP
        • Nov 2006
        • 16032

        #4
        You'll have to submit the form manually because you're in the inner function, e.g.
        Code:
        if (r) document.getElementById("formID").submit();

        Comment

        Working...