When I click the button, I use the following code for the function for the dialog:
function Confirmation(msg1){ if ($('#exportSales').length == 0) { $(document.body).append('<div id="exportSales">'+msg1+'</div>'); } else { $('#exportSales').html(msg1); } $("#exportSales").dialog({ autoOpen: false, show: "blind", hide: "explode", height: 450, width: 1000, modal: true }); $( "#exportSales" ).dialog("open"); }
However, when I test this in FireBug, it shows this error in the console:
TypeError: $(...).dialog is not a function [Break On This Error] modal: true
EDIT . There is another dialog box in the document that works great. when I comment that then this dialogue opens. How do I change the code so that they can work together on the same page?
Hardcode
source share