www.webdeveloper.com
Results 1 to 2 of 2

Thread: Urgent! jQuery jConfirm Help needed

  1. #1
    Join Date
    Jan 2010
    Posts
    3

    Urgent! jQuery jConfirm Help needed

    <script type="text/javascript">

    function removeRecord() {

    jConfirm('Can you confirm this?', function(r) {
    if(r){
    setAction('delete');
    return true;
    }else{
    return false;
    }
    });

    }

    </script>


    <html:form>

    <html:submit styleClass="btnBar" value="Delete" onclick="return failsafe(function() {return removeRecord();});"/>

    </html:form>

    my code as above, desired behaviour, when i click at delete, if i choose OK, i will setAction('delete') and return true to the submit to proceed submit the form, but when i click cancel, it should stop.

    Problem is my jConfirm will continue to run without stop and wait for user input. it will continue to submit the form. Please help.
    Last edited by Kor; 01-18-2010 at 10:56 AM. Reason: JQuery prefix added

  2. #2
    Join Date
    Jul 2010
    Posts
    1
    Why you just don't do :

    Code:
    <script type="text/javascript">
    function removeRecord() {
    	if  (confirm("Can you confirm this?")) {  
    		alert('yihaa');
    		return true;
    	}else{
    		return false;
    	}	   
    }
    </script>
    <form><input type="submit" class="btnBar" value="Delete" onclick="removeRecord();" /></form>
    ??

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles