I use jQuery with a validation plugin when submitting a form:
$('.frmProject:visible').validate( { errorContainer: ".site_details:visible .messageBox1", errorLabelContainer: ".site_details:visible .messageBox1 span.messagehere", invalidHandler: function(form, validator) { }, rules: { site_id: { required: true, } }, messages: { site_id: "Project has no assigned site information. Click the marker on the map at left to specify the site where this project took place." }, submitHandler: function(data) { SaveProject(); } });
In submitHandler
function SaveProject(){ //... load variables with input contents $.ajax({ url: 'ajax/save_project.php', dataType: 'json', data: 'id='+id+'&title='+title+'&project='+project+'§or='+sector+'&volunteer='+volunteer+'&lat='+lat+'&lng='+lng+'&name='+name+'&mun='+mun+'&prov='+prov, success: function(data) { //... load 'messages' object with stuff $.each(messages, function(key, value) { if (confirm(key)){ console.log(item); } }); } }); }
When I submit a validated form and it receives confirmation within each cycle, I get an error message: "confirmation is not a function."
How can I submit a message to the user for confirmation?
Edit:
When I type โconfirmโ in the console, I get the following:

A check in the DOM shows:
window> confirm () There are no properties for this object.
Testing in Script will lead me to a place in jquery-1.6.2.min.js
source share