i have an if condition that disables the dialog button 'proceed' if it is false. This is how i type it:
if (!goodtogo){
$(".ui-dialog-buttonpane button:contains('Proceed')").button("disable");
}
Some how it doesnt disable the dialog button onclick. What should i do?
Codes that create button:
$("#dialog-rate").dialog({
/*open: function (event, ui) {$(".ui-dialog-buttonpane button:contains('Proceed')")
.button("disable"); }, */
autoOpen: false,
resizable: false,
height: 200,
width: 200,
modal: true,
buttons: {
"Proceed": function(){
//redirect to paypal for escrow.
window.location.replace("{{ domain_url }}/workroom/accept/{{ i.iter.key.id }}/" + rating);
$(this).dialog("close");
}
}
});