I have the following modal dialog:
$(document).ready(function() {
$( "#addLocation" ).dialog({
modal: true,
height: 820,
width: 550,
buttons: {
"Add Location": function() {
document.forms['mapform'].submitted.value='1';
document.forms["mapform"].submit();
},
Cancel: function() {
$( this ).dialog( "close" );
}
},
});
});
How can I toggle the ‘Add Location’ button? I want it to display only when a certain button within the dialog is clicked.
Thanks,
You can do it like this:
hide you add location button as soon as dialog is shown on screen. call this after the dialog open command
Then add event to the desired button that will toggle the add location button