<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.


Reply With Quote
Bookmarks