Dialog UI Won't Perform Click Action Callback Function
Hello everyone,
I'm trying to write a script utilizing the jQuery dialog UI. The form shows up in the dialog box as it's suppose to. The "Submit" button is created. The weird thing is when you click on the Submit button, if I have a "close" action inside the function, it works. But if I have another function to be called inside of the click function, it won't call that function.
- /**
* set the dialog
*/
var createDialog = function(autoOpen=false, height=300, width=300, modal=true) {
dialogForm.dialog({
autoOpen: autoOpen,
height: height,
width: width,
modal: modal,
buttons: [
{
text: "Submit",
click: function() {
$(this).dialog("close"); // this works just fine
someFunctionCall(); // this won't work..
- console.log("testing"); // this won't work either
}
}
]
});
}
The someFunctionCall() is located inside of the same JavaScript class. So it's not an issue of it being undefined. Any idea on how to fix this? Thanks in advance.