-1

Guys do you know how to call external file for insert to dialog with Metro ui framework. I have followed docs here: http://metroui.org.ua/dialog.html But its not showing how to call external file like .html or .php. Please can you help me advice or solution.thanks

Dinshaw Raje
  • 933
  • 1
  • 12
  • 33
Ilham
  • 21
  • 9

1 Answers1

1

You can make an ajax call and set the result as content for the dialog on onShow event. [source]

$("#createFlatWindow").on('click', function(){
    $.Dialog({
        overlay: true,
        shadow: true,
        flat: true,
        icon: '<img src="images/excel2013icon.png">',
        title: 'Flat window',
        content: '',
        onShow: function(_dialog){
             $.ajax({
               url: "test.php", 
               dataType: "html",
               success: function(result){
                 var html = result;
                 $.Dialog.content(html);
               }
             });            
        }
    });
});
anpsmn
  • 7,217
  • 2
  • 28
  • 44
  • guys its great the external page successfull load, but why got error?the dialog cannot be closed.please help me im already confused – Ilham Apr 02 '15 at 06:37
  • no problem guys, i forget to placed something.thanks for your helping – Ilham Apr 02 '15 at 09:28