Hello All, I have an interesting problem in which I'm using the .dialog() to load a dialog box. This is working perfectly the first time I click my button, but after closing the dialog and clicking the button again, I get nothing. No dialog, no nothing. Can't really figure out why it would work find the first time I click, but not after that point. Do I need to rebind an event to the button again? My code is below (used to delete a record from the DB):
$('#delete_client').click(function(){
$('#delete_client_modal').dialog({
bgiframe: true,
resizable: false,
height:140,
modal: true,
overlay: {
backgroundColor: '#000',
opacity: 0.5
},
buttons: {
'Delete This Client': function() {
$.getJSON(BASE_URL +
"clients/delete_client/" + $
('#client_id').val(),
function(data){
if(data.error){
alert(data.error);
return(false);
}else{
$('#delete_client_modal_success').dialog({
bgiframe: true,
modal:
true,
buttons: {
Ok: function() {
window.location = BASE_URL + 'clients/edit/';
return(false);
}
}
});
}
});
$(this).dialog('close');
return(false);
},
Cancel: function() {
$(this).dialog('close');
return(false);
}
}
});
return(false);
});
Thanks to anyone that might be able to shed some light on this!
Greg
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---
