new problem with dialog in rc6
I'm trying to bind to the submit function, pop up a dialog box, and
set a value on a hidden field before a page is submitted.
It's late here, and I'm pretty new to the JQuery UI stuff so not sure
if this is me or a bug - but I think this code was working and has
broken with the upgrade to rc6 - the only change I made was to take
out the overlay. Instead of waiting for a button click, it now falls
straight through and submits the form.
Any thoughts much appreciated.
$(document).ready(function(){
$("#new_contact").submit(function(){
$("#dialog").dialog({ modal: true,
buttons: {
'Yes': function() {
$("#show_org").val(true)
$(this).dialog('close');
return true;
},
'No': function() {
$("#show_org").val(false)
$(this).dialog('close');
return true;
}
}
});
return false;
});
});